aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; ↵Sven Gothel2013-10-031-1/+10
| | | | GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present.
* GLJPanel: Fix 7u40 access to property 'sun.java2d.opengl'. Property was ↵Sven Gothel2013-10-031-6/+1
| | | | trusted before ..
* Add notice about 'GL states' regarding GLSL vertical flip (Bug 842 and Bug 826).Sven Gothel2013-10-021-2/+13
|
* GLJPanel/AWTGLPixelBuffer: Reused BufferedImage didn't account for ↵Sven Gothel2013-10-021-9/+17
| | | | | | | | | | | | | | | | | | | | | row-stride (regression of b33bdf41cf53f37203643a8551bf5d94b42a8fab) SingleAWTGLPixelBufferProvider w/ allowing row-stride reuses the AWTGLPixelBuffer and it's BufferedImage even w/ different width. This leads to distortion if using the BufferedImage unhandled. GLJPanel also set GL_PACK_ROW_LENGTH to pixelBuffer.width, which leads to an 'out-of-bounds' exception if ReadPixels is used w/ panelwidth and panelHeight. ++ Introduce AWTGLPixelBuffer.getAlignedImage(width, height) which returns an aligned BufferedImage while reusing the DataBuffer. GLJPanel fetches a new alignedImage if required. This allows a more efficient single buffer usage as intended, w/o the need of copying data.
* GLJPanel/Printing: Perform backend.reshape immediatly after printing if ↵Sven Gothel2013-09-291-9/+15
| | | | | | | resized; Add unit test for resize while printing. Perform immediatly reshape at releasePrint on AWT-EDT: - sendReshape = handleReshape(); // reshapeSize -> panelSize, backend reshape w/ GL reshape
* GLJPanel: Remove forced DEBUG .. at handleReshape in releasePrint (added w/ ↵Sven Gothel2013-09-281-1/+1
| | | | commit fe284b515d984198fdbe702837809f181625a457)
* AWT Printing: releasePrint() issue reshape from AWT-EDT; GLJPanel: Issue ↵Sven Gothel2013-09-282-13/+31
| | | | 'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize.
* Fix AWT Printing: Use delegated GLDrawable's size for tile-size instead of ↵Sven Gothel2013-09-282-7/+8
| | | | | | | | | AWT-GLAD's size, since the latter uses AWT's component size. .. the AWT component size could have been modified after setupPrinting(..). The AWT-GLAD getWidth() and getHeight() is implemented by AWT's component and hence may not reflect the actual GLDrawable size while printing.
* TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying ↵Sven Gothel2013-09-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | functionality (reshapeTile(..), ..); Only process GLEventListener impl. TileRendererListener; attachToAutoDrawable -> attachAutoDrawable, etc. -TileRendererNotify -> TileRendererListener - Added methods: - void reshapeTile(TileRendererBase tr,int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight); - void startTileRendering(TileRendererBase tr); - void endTileRendering(TileRendererBase tr); allowing to clarify user code and API specification, i.e. TR only processes GLEventListener which impl. TileRendererListener. This also allows simplifying the API doc, while having a more descriptive reshape method focusing solely on tile rendering. Further more, the start/end TR methods allow certain GL related actions while the context is current before and after iterating through the tiles. This is even used for RandomTileRenderer (one tile only), to allow to reuse same TileRendererListener for diff TRs. - Fix language, attach and detach usage was vice versa. We do attach an GLAutoDrawable to a TR - attachToAutoDrawable -> attachAutoDrawable - detachFromAutoDrawable -> detachAutoDrawable - Adapted unit tests.
* Fix Bug 839: Clarify whether resetStates(..) shall clearStates() - Pass ↵Sven Gothel2013-09-211-3/+6
| | | | 'isInit' flag.
* Fix Bug 826: GLJPanel: Fully restore TextureState and ViewportSven Gothel2013-09-201-7/+46
| | | | | | | | | | | | In FBO mode save TextureState of current texture-unit, as well as for the fbo texture-unit if the latter is a different. In glslTextureRaster mode for verical flip (using FBO), set the viewport to drawable size if before flipping and restore afterward - if equired. TestGLJPanelTextureStateAWT fully tests use cases: - Keep texture bound w/ same or other texture-unit - Use 2 viewports within one drawable and keep it
* AWTTilePainter.setupGraphics2DAndClipBounds(): Use 'Shape getClip()'; Use ↵Sven Gothel2013-09-192-24/+36
| | | | | | | | | | | | | | | | double precicion clip bounds 'all the way'; Explicitly scale image and clip w/ current scaled transform. - Use 'Shape getClip()' Don't assume Rectangle2D, but use Shape's getBounds2D() - Use double precicion clip bounds 'all the way' Remove rounding error on clip bounds w/ start value, which was _not_ using doubles. - Explicitly scale image and clip w/ current scaled transform. Instead of abusing Graphics2D's clip shape to scale image size and clip-area, explicitly use transform both bounding boxes into transformed space, scale space and transform out (inversion). A possible NoninvertibleTransformException will be thrown while Graphics2D has not been modified.
* AWT Printing: Move init-test of setupPrint(..) to AWT-EDT Runnable ; ↵Sven Gothel2013-09-172-35/+43
| | | | GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas)
* Fix AWT printing issues w/ overlapping and/or non-opaque contents ; Change ↵Sven Gothel2013-09-153-217/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AWTPrintLifecycle's lifecycle - AWTPrintLifecycle: - Should decorate: PrinterJob.print(..), instead of within Printable.print(..) { .. container.printAll(..); .. } This is due to AWT print implementation, i.e. AWT will issue Printable.print(..) multiple times for 'overlapping' or non-opaque elements! - Move from javax.media.opengl.awt -> com.jogamp.nativewindow.awt - Make _interface_ AWT agnostic, i.e. remove Graphics2D from 'setup(..)' - Add 'int numSamples' to 'setup(..)' to determine the number of samples - AWTTilePrinter: - Use double precision when scaling image-size and clip-rect, then round them to integer values. Otherwise AWT will use the bounding box for the clipping-rectangular. - Clip negative portion of clip-rect, this removes redundant overpaints, as well as increasing the tile count due to the increased clipping-size. - Clip the image-size in the tile-renderer according to the clip-rect. - DEBUG_TILES: Dump tiles to file - Use sub-image of final BuffereImage instead of adding another clipping region. This might increase performance if no clip-rect has been set. TODO: TestTiledPrintingGearsSwingAWT overlapping tests exposes a 'off by one' bug of the first layer's background! Note: The GL content seems to be correct though - maybe it's simply an AWT rounding error ..
* AWTTilePainter: Fix null clip-rect (consider scaling); Fix non GL-oriented ↵Sven Gothel2013-09-132-1/+2
| | | | drawable, skip vertical flip and use 1:1 y-coord.
* AWT Printing: AWTTilePainter needs to handle null clip!Sven Gothel2013-09-102-2/+2
|
* AWTPrintLifecycle: Add DEFAULT_PRINT_TILE_SIZE (512); Remove unused imports.Sven Gothel2013-09-083-12/+5
|
* Add AWTTilePainter.dumpHintsAndScale(..), removing more duplicated code from ↵Sven Gothel2013-09-082-22/+2
| | | | GLCanvas/GLJPanel
* Fix some JavaDoc and API doc (reference) bugs ..Sven Gothel2013-09-089-54/+65
|
* AWTPrintLifecycle: Add detailed API docSven Gothel2013-09-081-1/+62
|
* Test: Don't resize frame, tweek print-matrix; AWTPrintLifecycle: Add scale ↵Sven Gothel2013-09-083-72/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and convenient AWT container traversal context; GLCanvas/GLJPanel properly handle existing MSAA and req. AA; - Test: Don't resize frame, tweek print-matrix - Use scaleComp72 to scale the frame to fit on page, i.e. global print matrix - Use scaleGLMatXY = 72.0 / glDPI to locally scale on the GL drawable as being passed to AWTPrintLifecycle.setup(..) - Hence frame stays untouched/stable, no need for 'offscreen' print test, which is removed. - AWTPrintLifecycle: Add scale and convenient AWT container traversal context Use a simple decoration for all AWTPrintLifecycle impl. components within a container: final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY); try { } finally { ctx.releasePrint(); } - GLCanvas/GLJPanel properly handle existing MSAA and req. AA; - GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO, i.e. stay 'onscreen' - GLJPanel: Use new offscreen FBO if MSAA is requested and not yet used. - GLJPanel.Offscreen.postGL(): always swapBufer(), was missing for !GLSL swapping Results GLCanvas / GLJPanel: - Good scaling - Stable behavior / visibility - High DPI mode works
* TiledPrintingAWTBase: Fix scaling - Fit frame to page, add MSAA ↵Sven Gothel2013-09-073-29/+51
| | | | | | | | | | | | | | RenderingHints test; setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering - AWTPrintLifecycle.setupPrint(Graphics2D): Query RenderingHints to use MSAA rendering - Impl. in GLCanvas - TODO GLJPanel (would need a new offscreen buffer) - TiledPrintingAWTBase: - Fix scaling - Fit frame to page - add MSAA RenderingHints test - GLCanvas: Remove dumpStack() DEBUG output
* Complete commit 54dcdf1f53c9fc1f7124cf77bbf5aa952d42053a, exposing GL2ES3 in ↵Sven Gothel2013-09-072-2/+10
| | | | GLProfile (just a query, no new profile)
* AWT/GL Printing WIP: Abstract AWT tile painting code out to AWTTilePainter, ↵Sven Gothel2013-09-072-301/+83
| | | | reused w/ GLCanvas and GLJPanel
* GLCanvas Printing WIP: Add GLJPanel; GLCanvas TILE_SIZE 512; ↵Sven Gothel2013-09-062-75/+339
| | | | print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
* Add AWTPrintLifecycle interface describing impl. w/ ↵Sven Gothel2013-09-062-1/+52
| | | | setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
* GLCanvas Printing WIP: Perform all print* operations on AWT-EDT, clip before ↵Sven Gothel2013-09-061-147/+184
| | | | drawing image and show same; Test: Add offscreen print and add borders.
* GLCanvas Printing WIP: Swap to offscreen at setupPrint(); Use TileRenderer @ ↵Sven Gothel2013-09-061-107/+129
| | | | | | | | | | | | | | | | | | | | | | | | print(..); Test: Add auto-print w/o UI 72dpi and 300dpi NOTE: Tile raster is added at print plus lots of debug output - WIP! - Swap to offscreen at setupPrint() - Swap GLEventListener (GLEL) and GLContext to fixed size offscreen GLAutoDrawable (GLAD) - Destroy onscreen drawable/context - Setup TileRenderer w/ offscreen GLAD - @ releasePrint() restore onscreen .. This shall ensure we don't hog the GPU resources when resizing the AWT component (upscaling). - Use TileRenderer @ print(..) The clip-rect will be used as the TileRenderer's image-size and we perform a whole tile-rendering loop. This helps to limit resources, see above. - Test: Add auto-print w/o UI 72dpi and 300dpi
* GLCanvas Printing WIP - Add TestTiledPrintingGearsAWTSven Gothel2013-09-051-30/+36
|
* TileRendererBase: API-doc cleanup; Fix GLCanvas, WIP printing ..Sven Gothel2013-09-051-66/+122
|
* TileRenderer*: Enhance API Doc; Cleanup OO; Remove PMVMatrixCallback, use ↵Sven Gothel2013-09-051-0/+110
| | | | | | | | | | | | | GLEventListener reshape(..) or manual reshape after beginTile(..) method. GLEventListener reshape(..) method should be aware of TileRenderer usage and get the missing tile position and image size from it (-> see Gears example). TestRandomTiledRendering3GL2AWT demos AWT GLCanvas onscreen being used for random tile rendering to produce a PNG file. TestTiledRendering1GL2 is now GLAutoDrawable/GLEventListener agnostic, hence demos plain GLDrawable tile rendering usage.
* GLPixelBuffer*: Add componentCount==1 (ALPHA/RED), 'allowRowStride' ↵Sven Gothel2013-09-041-6/+7
| | | | | | | | | | | | | | | | | utilization AWTGLPixelBuffer* -> GLPixelBuffer* GLPixelBufferProvider: - Default*.getAttributes(): Add componentCount==1 (ALPHA/RED), validate values, throw exception if n/a or not supported - Add 'allowRowStride' (as for AWTGLPixelBufferProvider) - Add default for true and false GLPixelBuffer: - Add 'allowRowStride' (as for AWTGLPixelBuffer) - Fix requiresNewBuffer(..): - aquire minByteSize if passed one is <= 0 - validate minByteSize w/ currentByteSize according to allowRowStride. AWTGLPixelBuffer: 'allowRowStride' impl. moved to GLPixelBuffer.
* GL*, GLContext: Expose isGL2ES3() and getGL2ES3() for convenience.Sven Gothel2013-09-032-0/+21
|
* Fix Bug 810: Adding Julien Gouesse's fix while moved the new ↵Sven Gothel2013-09-021-6/+2
| | | | 'addNativeJarLibsJoglCfg(..)' to GlueGen, commit c0ead6fa10280f8076704726d59f482b183fd77e
* GLContext: Add missing 'isGLESProfile()' and fix 'isGLcore()', i.e. GL2ES2 ↵Sven Gothel2013-08-311-1/+2
| | | | -> GLES2 (in profile set)
* Fix Bug 815: GL*: Change glIs<Buffer>Enabled() -> glIs<Buffer>Bound() to ↵Sven Gothel2013-08-141-2/+2
| | | | | | | | | | | | | | | | reflect semanics - Also fix the exception message (enabled/disabled -> bound/unbound) Reason of change: Avoid confusion and point to the cause! API change: glIsVBOArrayEnabled() -> glIsVBOArrayBound() glIsVBOElementArrayEnabled() -> glIsVBOElementArrayBound() glIsPBOPackEnabled() -> glIsPBOPackBound() glIsPBOUnpackEnabled() -> glIsPBOUnpackBound() Exception message change: "must be enabled to call this method" -> "must be bound to call this method" "must be disabled to call this method" -> "must be unbound to call this method"
* GLDrawableFactory: Expose createDummyDrawable(..) / GLDrawableFactoryImpl: ↵Sven Gothel2013-08-101-1/+15
| | | | | | Make impl. methods final. createDummyDrawable(..) is useful for efficient shared context w/o actually rendering to this dummy drawable's framebuffer
* GLContext: Refine API doc (CONTEXT_NOT_CURRENT.. values) / Exception messageSven Gothel2013-08-101-3/+3
|
* Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-173-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class. Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to 'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization. Iff that happens, an AccessControlException may happen, due to requesting an insecure property, since modules own Debug class has not been added it's trusted prefixes from within it's init block yet. This seems to be a bug of the JVM .. to me, however .. the above description is the only able to explain the issue at hand. +++ Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(), before calling 'isPropertyDefined(propName, default)'. +++ Also mark Debug class static methods final! +++
* Fix OSX GL-core lack of pbuffer: GLDrawableFactory.canCreateGLPbuffer(..) ↵Sven Gothel2013-07-171-7/+11
| | | | | | add GLProfile argument, similar to canCreateFBO(..) In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
* Fix GLContext.isGLES3CompatAvailable(..) API doc and reorder query (from ↵Sven Gothel2013-07-161-4/+4
| | | | commit 1a20ef3aa1dc9acedd7da0475ee19d4c40b18498)
* Redefine: isGLES3Compatible() and isGL4ES3(), i.e. allow GL4ES3 usage in ↵Sven Gothel2013-07-163-47/+97
| | | | | | | | | case proper ES3_compat is given. isGLES3Compatible() and isGL4ES3() of GLBase _and_ GLContext includes [ GL >= 4.3, GL >= 3.1 w/ GL_ARB_ES3_compatibility and GLES3 ]. Tested GL 'aliasing' w/ TestGLProfile01NEWT, i.e. isGL*() and getGL*().
* GLProfile: Abstract profile to impl. mapping, i.e. GL2ES2 -> GL3, favors ↵Sven Gothel2013-07-161-26/+20
| | | | core profile now - no more OSX exception!
* GL*: Expose isGL*Core(); GLContext: isGL*() API doc cleanup - align queries.Sven Gothel2013-07-162-10/+52
|
* Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..); ↵Sven Gothel2013-07-1611-2/+238
| | | | | | | | | | | | | | | | | | | BuildComposablePipeline: Unify GL identify methods - Only use base pipelines for Trace/Debug, mock others (ES2, GL2, ..) The Trace/Debug generated pipelines consume quite some space and only the actual GL*Impl pipeline is actually required. To make this work, we have to identify the GL type via it's downstream instance to implement isGL*() and getGL*() methods, see below! Adding dummy Trace/Debug type wrapper for GL2, GL3, GL3bc, GL4 and GLES2. BuildComposablePipeline: Unify GL identify methods As described above, Trace/Debug shall utilize downstream identification for isGL*() and getGL*() methods. Custom types, like FixedFuncImpl may choose to be identified by their class inheritance, by passing command-line argument 'gl_identity_by_assignable_class'.
* Fix value range of CTX_* options bits, regression of commit ↵Sven Gothel2013-07-151-7/+10
| | | | 3a0d7703da32e9a5ddf08a334f18588a78038d88
* Fix BuildComposablePipeline's isGL*/getGL* ; GLBase: ↵Sven Gothel2013-07-152-32/+160
| | | | | | | | | | | | | | | | getDownstreamGL()/getRootGL(); GLContext.isGL* added proper API doc., isGL3core()/hasNoDefaultVAO() and getDefaultVAO(). - Fix BuildComposablePipeline's isGL*/getGL* (regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d880) - GLBase: getDownstreamGL()/getRootGL() Allows user traversing through pipelined GL instances. Also added getRootGL() to GLContext. - GLContext.isGL* added proper API doc.: We test the actual context, not the profile. - GLContext isGL3core()/hasNoDefaultVAO() and getDefaultVAO() - Move isGL3code() def. back to pre 3a0d7703da32e9a5ddf08a334f18588a78038d880, i.e. Includes [ GL4, GL3 ] w/o GLES3. - Added hasNoDefaultVAO() and getDefaultVAO() .. incl. [ GL4, GL3, GLES3 ]
* Add Support for GL 4.3 (Bug 716) and ES 3.0 (Bug 717)Sven Gothel2013-07-154-197/+442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ES3 / GL4.3: - Update all EGL, GLX, WGL and GL (desktop and mobile) khronos headers to latest version. - GL3/gl3* -> GL/glcorearb* - Explicitly preserve ES2_compatibility and ES3_compatibility in header, most extension grouping was removed in new headers. - Always load all GLHeader to ensure proper extension association across all profiles. - Unified method signatures - Added GL_EXT_map_buffer_range to core - Using common 'glMapBufferImpl(..)' for all glMapBuffer(..) and glMapBufferRange(..) impl. - Init necessary fields of GL instances via 'finalizeInit()' called by reflection, if exist. This allows removing initialization checks, i.e. for all buffer validations. - BuildStaticGLInfo: Can handle new GL header structure, i.e. one CPP extenstion block incl. define + funcs. - GLJavaMethodBindingEmitter: Simply print the - No GL duplication due to new intermediate interfaces, see below - OO lineare inheritance (Added GL2ES3, GL3ES3 and GL4ES3 intemediates): GLBase - GL - GL2ES2 - GLES2 GLBase - GL - GL2ES2 - GL2GL3 - [ GL2, GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - [ GL3 ] GLBase - GL - GL2ES2 - GL2ES3 - GL3ES3 - GL4ES3 - [ GLES3, GL4, .. ] - Expose 'usable' intermediate interfaces GL3ES3 and GL4ES3 in GLBase/GLProfile/GLContext via is*() and get*(). - GLContext*: - isGL3core() is true if [ GL4, GL3, GLES3 ] (added GLES3) - Added ctxProfile argument to allow handling ES versions: - getMaxMajor(..), getMaxMinor(..), isValidGLVersion(..) and decrementGLVersion(..) - mapGLVersions(..) prepared for ES ARB/KHR validation - EGLContext checks ES3 (via old ctx's GL_VERSION) - ExtensionAvailabilityCache adds GL_ES_Version_X_Y for ES. - Prelim tests w/ Mesa 9.1.3 GL Version 3.0 (ES profile, ES2 compat, ES3 compat, FBO, hardware) - OpenGL ES 3.0 Mesa 9.1.3 [GL 3.0.0, vendor 9.1.3 (Mesa 9.1.3)] - TODO: - Use KHR_create_context in EGLContext.createContextARBImpl(..) - More tests (Mobile, ..) +++ Misc: - GLContext*: - Complete glAllocateMemoryNV w/ glFreeMemoryNV.
* Workaround NVidia driver 325.8 returning 4.3-compat for any compat request, ↵Sven Gothel2013-07-051-3/+10
| | | | | | i.e. allowing 4.3 and 4.4 for GL version validation. 4.4 b/c it may come up soon.
* Remove deprecated methods.Sven Gothel2013-07-041-4/+0
| | | | | | | | | - Quaternion.isEmpty() - Texture.dispose(GL) - GLContext.getGLVersionMajor() / ..Minor() - GLContextImpl.bindPbufferToTexture() / releasePbufferFromTexture() - MouseEvent.getWheelRotation() -