| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
CTX_IMPL_FP32_COMPAT_API: "FP32 compat-api" -> "FP32 compat"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux - No compatibility GLProfile (GL2, >= GL3bc)
Fix GL Version Validation:
We shall not rely on our known good versions when validating a queried GL context version,
but allow some 'room' for a higher version post JOGL release while still
cutting off 'odd versions'.
While GL version detection, we always iterate from the highest known version
down to the lowest. Hence 'GLContext.isValidGLVersion(..)' is satisfied
by validating the lowest version number but allowing a higher than known one.
Now we would return 'invalid' for a version >= 6.
It is enough to clip to the maximum known version when iterating,
allowing the highest unknown version to be available.
GLContext.isValidGLVersion(..):
Returns true, if the major.minor is not inferior to the lowest
valid version and does not exceed the highest known major number by more than one.
The minor version number is ignored by the upper limit validation
and the major version number may exceed by one.
The upper limit check is relaxed since we don't want to cut-off
unforseen new GL version since the release of JOGL.
Hence it is important to iterate through GL version from the upper limit
and 'decrementGLVersion(..)' until invalid.
Add GL Version 4.4 to valid known versions.
Remove ES3 desktop detection, which is impossible
Regression of commit 3a0d7703da32e9a5ddf08a334f18588a78038d88 (ES3 support)
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
a05b87a369441d9ef38f97929f866b3d4ced0e57: NULL printGLAD of GLCanvas and NewtCanvasAWT
We have to pre-init printGLAD w/ current GLAD (similiar w/ GLJPanel).
Also properly define reqNewGLAD:
reqNewGLAD = !caps.getSampleBuffers() && ( reqNewGLADOnscrn || reqNewGLADSamples || reqNewGLADSize );
where '!caps.getSampleBuffers() && ( .. )' is due to Bug 830,
swapGLContextAndAllGLEventListener and onscreen MSAA w/ NV/GLX does not work.
|
|
|
|
| |
allowing user to set custom tile size for performance evaluation/tweak
|
|
|
|
| |
beginTile() throws an EOT IllegalStateException to avoid division by zero
|
|
|
|
| |
GLContext: isCPUSourcedAvail() -> isCPUDataSourcingAvail()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
core >= 3.0) ; GL2 cfg: Ignore GL2ES3 symbols (super)
Remove CPU sourced data API entries via new config 'BufferObjectOnly <name>',
listed in 'gl-common-gpubufferonly.cfg' and included in ES3 and all GL core >= 3 interfaces.
If BufferObjectOnly is defined for a function, only the 'long offset' variant is being emitted.
Due to limitations of GlueGen's 'ExtendedInterfaceSymbolsIgnore A.java', which only
identifies the function name and not the signature - all CPU sourced variants
are manually added to the compatibility and ES2 GL profiles via '*-common-cpubufferJavaCode.java' files.
GLContext: Added 'isCPUSourcedAvail()' to determine whether context allows CPU sourced data,
i.e. for GL2ES1 and GLES2 ctx.
GLContext/GLProfile/GL: isGLES2() now returns false if having a ES3 context due to 'CPU sourced'
incompatibility!
+++
GL2 cfg: Added ignore GL2ES3 symbols of it's superclass, removing duplicated symbols.
|
|
|
|
| |
GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present.
|
|
|
|
| |
trusted before ..
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
commit fe284b515d984198fdbe702837809f181625a457)
|
|
|
|
| |
'handleReshape' if panelSize/awtSize mismatch, otherwise 'sendReshape' and exception if offscreen size doesn't match panelSize.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
'isInit' flag.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
GLJPanel: Attempt to initialize if not done yet (similar to GLCanvas)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ..
|
|
|
|
| |
drawable, skip vertical flip and use 1:1 y-coord.
|
| |
|
| |
|
|
|
|
| |
GLCanvas/GLJPanel
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
GLProfile (just a query, no new profile)
|
|
|
|
| |
reused w/ GLCanvas and GLJPanel
|
|
|
|
| |
print(Graphics): Don't force on AWT-EDT -> Deadlock; releasePrint(): perform reshape/display!
|
|
|
|
| |
setupPrint()/releasePrint(), modularize unit test TestTiledPrintingGearsAWT
|
|
|
|
| |
drawing image and show same; Test: Add offscreen print and add borders.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
'addNativeJarLibsJoglCfg(..)' to GlueGen, commit c0ead6fa10280f8076704726d59f482b183fd77e
|
|
|
|
| |
-> GLES2 (in profile set)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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"
|
|
|
|
|
|
| |
Make impl. methods final.
createDummyDrawable(..) is useful for efficient shared context w/o actually rendering to this dummy drawable's framebuffer
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
+++
|
|
|
|
|
|
| |
add GLProfile argument, similar to canCreateFBO(..)
In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
|
|
|
|
| |
commit 1a20ef3aa1dc9acedd7da0475ee19d4c40b18498)
|