| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DirectDataBufferInt/BufferedImageInt
- PixelFormat
Refine definition allowing complete format conversion by its attributes
instead of static 'knowledge'.
- PixelFormat has_a *new* PixelFormat.Composition
- PixelFormat.Composition contains all pixel component layout
information as required for inspection and conversion.
Component names are enumerated via PixelFormat.CType.
- PixelFormatUtil.convert(..) utilizes generic conversion
based on PixelFormat.Composition rather static type mapping.
However, a int32 RGBA static conversion is still supported for performance.
Utilizes Bitstream for varying pixel component bit-width.
- Complete w/ hashCode() and equals(..)
- GLPixelBuffer
- Take 'pack' mode into account when determine GLPixelAttributes,
i.e. on GLES pack=true (e.g. glReadPixel) only RGBA is guaranteed to work.
Hence querying GLPixelAttributes requires the GLProfile, PixelFormat and pack mode.
- Complete GLPixelAttributes conversions from PixelFormat or GL format/data-type,
while taking GL data-type into account, as well as pack-mode.
- Complete w/ hashCode() and equals(..)
- SingletonGLPixelBufferProvider queries singleton GLPixelBuffer via
- PixelFormat.Composition hostPixelComp,
- GLPixelAttributes pixelAttributes,
- boolean pack
which comprise a unique key, allowing the implementation to utilize
a hash map. This is implemented in AWTSingletonGLPixelBufferProvider.
This allows distinct singleton GLPixelBuffer for different
host PixelFormat (conversion) and GLPixelAttributes (depending on GLProfile).
- Removes field 'componentCount' which was 'hacked in' to pass
information about an optional host memory layout.
Implementations utilizing conversion, e.g. AWTGLPixelBuffer,
can implement GLPixelBufferProvider's
'PixelFormat.Composition getHostPixelComp(final GLProfile glp, final int componentCount)'
and manage such implementation details, see use-case GLJPanel.
- DirectDataBufferInt/BufferedImageInt: Expose underlying NIO ByteBuffer
- AWTMisc.createCursor(..) uses DirectDataBufferInt.BufferedImageInt exposed
NIO ByteBuffer, allowing to use generic PixelFormatUtil.convert(..).
|
|
|
|
|
|
| |
FBObject: Remove redudant case
GLBase: Add API doc reference to GLContext implementation
|
| |
|
|
|
|
| |
mis-interpretation alike Version130 -> [ 1.3.0 | 1.30.0 ] ?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.2 (Version110 and Version120 are for 1.10 and 1.20 GLSL)
Following commit introduced the wrong version usage, where a comparison w/ 1.1 and 1.2 was intended.
Commit 6363fccee219ce238b0b2ded39c116e2bc8613d5
GLBuffers.sizeof(..): Add support for ES3, reading supported glPixelStorei states
Commit 73a4d809f92126228b64a3bded75686db806be64
Don't utilize glPixelStorei's PACK/UNPACK IMAGE_HEIGHT and SKIP_IMAGES for Desktop GL < 1.2, avoiding GL-Error
Commit f358c49418e95c622d50eb29f53c60dc4dbdee5b
Bug 1047 - jogamp.opengl.glu.mipmap.Mipmap now uses already parsed GL version number and GL profile selection
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects if GLRendererQuirks.NeedSharedObjectSync is set.
GLSharedContextSetter#synchronization GL Object Synchronization
Usually synchronization of shared GL objects should not be required,
if the shared GL objects are created and immutable before concurrent usage.
However, using drivers exposing GLRendererQuirks.NeedSharedObjectSync
always require the user to synchronize access of shared GL objects.
Synchronization can be avoided if accessing the shared GL objects
exclusively via a queue or com.jogamp.common.util.Ringbuffer,
see GLMediaPlayerImpl as an example.
+++
GLRendererQuirks.NeedSharedObjectSync is set for all OSX versions
+++
Handle GLRendererQuirks.NeedSharedObjectSync in user code!
+++
All shared context tests passed on OSX 10.9.5,
and GNU/Linux w/ Nvidia + Mesa/AMD driver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
size panel size
This is a regression due to commit 84f367a73c5b16dcebfd877e82e1c2cb90ae74ce:
GLJPanel Cleanup: Remove initial FBO reshape;
** Propagate reshape only if differs from panel-size; ** <- this one
Use pre-fetched panel-size.
Above commit only issued 'sendReshape'
if the reshape-size differs from the actual panel-size.
Note: The reshape-size is propagated to panel-size either in
[1] initializeBackendImpl(..) or
[2] handleReshape(..) @ paintComponent.
While printing w/ an invisible GLJPanel the reshape-size
has not yet propagated to the panel-size (see above)
and two consecutive reshape calls will cause the last one to be dropped.
With this patch we have:
GLJPanel.addNotify()
GLJPanel.reshape.0 null resize [paint] [ this 0x0, pixelScale 1x1, panel 560x420] -> 0x0 * 1x1 -> 0x0, reshapeSize 0x0
GLJPanel.reshape.0 null resize [paint] [ this 560x420, pixelScale 1x1, panel 560x420] -> 560x420 * 1x1 -> 560x420, reshapeSize 560x420
GLJPanel.setupPrint: scale 1.000000 / 1.000000, samples 0, tileSz -1 x -1
GLJPanel.createAndInitializeBackend.1: [printing] 560x420 @ scale 1x1 -> 560x420 @ scale 1x1
A
|
|
|
|
| |
regression during print
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
software/hardware attribute of all profiles
GLProfile's mapping code does not consider the following combination:
- GL4 software
- GL3 hardware
and hence maps GL4-software -> [GL2ES2, GL2GL3],
where GL3-hardware -> [GL2ES2, GL2GL3] is desired.
This combination has recently been observed on
Mac OSX 10.9.5, which includes a software GL 4.1 implementation.
However, other systems could be affected as well.
+++
Fix GLProfile.computeProfileImpl(..):
Only use the higher profile, if hardware-accelerated or none of the
lower profiles offers hardware-acceleration!
This extra condition was missing for certain profiles,
e.g. GL4, GL4bc, GL3, GL3bc and GL2.
Conflicts:
make/scripts/tests.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initializeBackendImpl()
Commit 84f367a73c5b16dcebfd877e82e1c2cb90ae74ce removed utilization of reshape-size
in case panel-size is valid, even if a reshape event happened in between:
- addNotify
- paintComponent
initializeBackendImpl() includes now uses reshape-size IFF handleReshape is set.
Before it was using reshape-size only if panel-size was invalid.
TestAWT03GLJPanelRecreate01 covers this issue.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if Offscreen-GLAD Realization throws an Exception (Stability)
- GLDrawableFactoryImpl: createOffscreenDrawable(..) and createDummyAutoDrawable(..)
Temporary catch exception during setRealized(true) of newly created GLDrawable,
to unrealize the instance before propagating the exception.
This handling removes a memory leak in case the exception of this method is handled
and application continues to operate, e.g. as in AWTPrintLifecycle.setupPrint().
The underlying drawable gets unrealized, since it's setRealized(boolean)
implementation toggles its realize-state before delegating the realize-operation.
Hence this is functional.
- AWTPrintLifecycle.setupPrint() Stability
Catch exception thrown by factory.createOffscreenAutoDrawable(..)'s setRealize(true)
to continue operation w/ onscreen GLAD.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c)
- GLFBODrawable:
- Remove FBOMODE_DEFAULT
- GLRendererQuirks:
- Remove COUNT
- Add getCount() method for future compatibility.
- Animator
- Hide local fields (private or package private)
|
|
|
|
|
|
|
|
|
|
| |
- dual-use reset(..), use dedicated init(..) and reset(..)
- GLFBODrawable.FBOMODE_USE_DEPTH: Use GLCapabilities.[get|set]DepthBits(int)
Note: Applications shall use _requested_ GLCapabilities,
if passing caps down to the GLFBODrawable.
Otherwise (using _chosen_ caps) we may end up in requesting
properties not desired, e.g. stencil bits, if driver has chosen.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix depth- and stencil bit count selection for attachRenderbuffer(..)
- Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS
- Refactor depth- and stencil bit-count -> format into own method
- Allow depth- and stencil bit-count select a higher bit-count if required (fix)
- GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..)
- It was an oversight to introduce the bit flag in the first place,
since we should have used the capabilities depth bit-count
- Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), ..
- Simplify API (init/reset)
- use new unique methods for init and reset:
- void init(final GL gl, final int newWidth, final int newHeight, final int newSamples)
- does not issue resetSamplingSink(..)
- boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples)
- always issues resetSamplingSink(..)
- deprecated dual-use (init/reset):
- boolean reset(final GL gl, final int newWidth, final int newHeight)
- boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink)
- reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0,
left up to resetSamplingSink(..)
- Track 'modified' state of FBObject,
if size, format or any attachment has been changed since last
- use(..)
- syncSamplingSink(..)
- resetSamplingSink(..)
- Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..)
if 'modified == true'
+++
- Fix setSamplingSink(..), i.e. samplingSink state handling:
- Validated whether given samplingSink is initialized,
throws Exception if not.
- Fix resetSamplingSink(..)
- resets the bound state, i.e. leaves it untouched
- also unbinds the samplingSink
- sampleSinkDepthStencilMismatch() also returns true if
this.depth/stencil == null, but samplingSink is not.
- Newly created colorbuffer/-texture matches
exiting colorbuffer's internal-format, if exists.
- Using simplified resetSizeImpl(..) for size mismatch
- Simplified samplingColorSink init check
- Fix isBound()
was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)'
fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)'
- Fix detachRenderbuffer(..) validates whether detachment was successful,
similar to detachColorbuffer(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
renderbuffer may cause a crash
Workaround crash caused by Mesa 7.2 software rendering
using color renderbuffer target in FBO.
If Mesa < 8.0 and software - or -
property 'jogl.fbo.force.nocolorrenderbuffer' is set,
set quirks:
- GLRendererQuirks.BuggyColorRenderbuffer
- GLRendererQuirks.NoFullFBOSupport (to disable MSAA)
GLFBODrawable always uses FBOMODE_USE_TEXTURE
if GLRendererQuirks.BuggyColorRenderbuffer is set.
+++
Crash Report:
GNU C Library : 2.13 stable
OpenGL : software
Operating System : Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64
Processor ID : x86 Family 6 Model 44 Stepping 2, GenuineIntel
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 00000000ff1818f0 RBX = 00000000beaf8afc
RCX = 0000000000000004 RDX = 00007f85ed9c9010
RSP = 00007f8252d24fd0 RBP = 00007f8252d25020
RSI = 0000000017b9b330 RDI = 0000000015bca400
R8 = 0000000000000000 R9 = 00007f81edcd3014
R10 = 00007f823565f6ce R11 = 00007f827bee49aa
R12 = 0000000000001406 R13 = 0000000000000001
R14 = 00000000154d5458 R15 = 00000000154d4f10
RIP = 00007f823565f7bc EFL = 0000000000010206
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f823565f7bc put_row_ubyte4 at /mesa/main/renderbuffer.c:665 (in /lib/libGL.so.1)
[ 1] 0x00007f8235727239 _swrast_write_rgba_span at /mesa/swrast/s_span.c:1450 (in /lib/libGL.so.1)
[ 2] 0x00007f823574b071 smooth_rgba_triangle at /mesa/swrast/s_tritemp.h:862 (in /lib/libGL.so.1)
[ 3] 0x00007f82357155f0 _swrast_Triangle at /mesa/swrast/s_context.c:692 (in /lib/libGL.so.1)
[ 4] 0x00007f8235771780 triangle_offset_twoside_rgba at /mesa/swrast_setup/ss_tritmp.h:188 (in /lib/libGL.so.1)
[ 5] 0x00007f82356d2cea _tnl_render_poly_elts at /mesa/tnl/t_vb_rendertmp.h:313 (in /lib/libGL.so.1)
[ 6] 0x00007f82356d335e _tnl_RenderClippedPolygon at /mesa/tnl/t_vb_render.c:244 (in /lib/libGL.so.1)
[ 7] 0x00007f82356c9313 clip_tri_4 at /mesa/tnl/t_vb_cliptmp.h:230 (in /lib/libGL.so.1)
[ 8] 0x00007f82356cd026 clip_render_triangles_verts at /mesa/tnl/t_vb_rendertmp.h:163 (in /lib/libGL.so.1)
[ 9] 0x00007f82356d37d9 run_render at /mesa/tnl/t_vb_render.c:320 (in /lib/libGL.so.1)
[ 10] 0x00007f82356c2436 _tnl_run_pipeline at /mesa/tnl/t_pipeline.c:158 (in /lib/libGL.so.1)
[ 11] 0x00007f82356c37da _tnl_draw_prims at /mesa/tnl/t_draw.c:402 (in /lib/libGL.so.1)
[ 12] 0x00007f82356b673a vbo_exec_DrawArrays at /mesa/vbo/vbo_exec_array.c:263 (in /lib/libGL.so.1)
[ 13] 0x00007f823583e5b0 glDrawArrays at /mesa/glapi/glapitemp.h:1645 (in /lib/libGL.so.1)
+++
|
|
|
|
| |
differs from panel-size; Use pre-fetched panel-size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Offscreen's GLCapabilitiesImmutable reconfiguration will dispose a realized instance
and issues recreation via initializeBackendImpl() immedietly.
Implementation performs operation on AWT-EDT.
Tests:
- TestGearsES2GLJPanelAWT:
- Toggle MSAA via 'm'
- TestGearsGLJPanelAWT:
- Toggle MSAA via 'm'
- Toggle Bitmap via 'b'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
success - otherwise pause()/.. return value is inconsistent.
Caller of e.g. pause() running on the anim-thread or AWT-EDT (AWTAnimatorImpl)
will be non-blocking.
Before this change, a non-blocking simply did not wait until the 'hold' condition is reached
and returned its negated value.
This ofc is 'false', indicated unsuccessful operation.
Caller use the return value to determine whether the call actually paused (or ..)
the animator. Despite the non-blocking nature, the pause state was set, even if not reached.
Hence a resume() would be required to continue operation after a temporary pause.
+++
This change ignores the non-blocking nature's unmet condition.
finishLifecycleAction() returns !nok || !blocking,
i.e. either true for the reached condition (blocking) or true if non-blocking.
Blocking calls with unmet condition still return false.
+++
In case an animated GLAutoDrawableis being pulled after a non-blocking animator pause() call,
the GLAutoDrawable's implementation thread-safety must ensure proper operation.
+++
|
|
|
|
|
|
|
|
|
|
| |
GL2ES3; Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO)
- Emphasize reset*() is being called when saving modes for 1st modification;
- setUnpackRowLength: GL2ES2 -> GL2ES3; Actually GL2ES3 is required for UNPACK_ROW_LENGTH
- Better adoption of GLPixelStorageModes (GLJPanel, GLReadBufferUtil, TextureIO)
|
|
|
|
| |
initialized
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983
Commit c78ceb642d0ef5bb5bf27ff8ff1495175ee2e983 changed:
- public static final String GL4 = "GL4";
+ public static final String GL4 = "GL4".intern();
which is identified by semver as incompatible,
due to Bug 1059 (no more inlining of interned string references).
|
|
|
|
| |
for GLSL >= 150 allowing GLSL compatibility profile
|
|
|
|
|
|
|
|
|
| |
'GL4', ..) consequently using reference comparison.
GLProfile already compared profile strings by reference, hence interning those strings
to become canonical references was missing!
Consequently using reference comparison for all profile strings in GLProfile.
|
|
|
|
|
|
|
|
| |
implementation - Part 2/2
- TestGLProfile01NEWT: Allow ctx.isGLES3Compatible() and hence GL4ES3 on GL3bc and GL3
- GLProfile: Remove GL4ES3 mapping using GL3bc and GL3, only GL4bc, GL4 and GLES3 are allowed in static mapping.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX/Nvidia's FBO needs to be cleared before blitting,
otherwise first MSAA frame lacks antialiasing.
GLFBODrawableImpl.initialize(..) can clear
GL.GL_COLOR_BUFFER_BIT and GL.GL_DEPTH_BUFFER_BIT, if used.
FBObject cannot clear the buffer(s) due to it's low-level API,
i.e. it cannot know when the first bind occurs _after_ user
completed FBO setup (attaching buffers).
Hence plain FBObject usage required manual injection
of glClear(..) after setup as demonstrated in GLJPanel.
We may need to elaborate in this case,
i.e. add an FBObject API entry like 'fbo.postInitNotify()'.
|
|
|
|
| |
protected field name w/o breaking backward compatibility
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fashion ; Don't use arbitrary shared context as 'master'.
GLContext* passes the shared-master to GLContextShareSet,
which only creates a sets of shared contexts
without differentiating the master context.
GLContext*'s shared-slave attempts to lock
the realized shared-master's surface at creation.
Currently only an arbitrary shared context is selected
due to the missing 'master' identity.
The arbitrary shared context's surface is locked
and its shared context handle used to create the slave context.
Lacking of using the user given shared-master
can lead to deadlock situations - and locking a 'wrong' surface.
+++
The patch:
- Allows query the user given shared-master!
- Use the user given shared-master for locking and it's
context handle for the slave's creation.
- The shared-context mapping maps each shared-master
to a shared-slave within one shared-context-set,
allowing deterministic and individual shared-master queries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
drawable; Review null checks and synchronization/locking.
'drawable' field of GLContextImpl is mutable via setGLDrawable(..),
which requires high-level locking as documented.
The required high-level locking allows us to _not_ add special
synchronization to this field (and drawableRead).
A simple null-check in makeCurrent() shall be sufficient,
plus ensuring mentioned high-level locking is applied.
GLContextImpl 'drawable' and 'drawableRead' synchronization:
- commit ad79bd072b600a3f2416cc6f0c61e2925000069d check of null drawable is sufficient
- Add GLAutoDrawable upstream-lock locking to:
- AWT GLCanvas setupPrint/releasePrint
- AWT GLJPanel (was missing)
Misc:
- validate shared-context native-surface locking, throw exception if not successful
- pixelDataEvaluated does not need to be synchronized, since it's being called while context is current, locking
- GLDrawableHelper.recreateGLDrawable(..): Remove redundant glFinish() call
|
| |
|
|
|
|
| |
complete notes in all implementations)
|
|
|
|
| |
GLAnimatorControl.UncaughtExceptionHandler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLAutoDrawable processing [part-3]
Add GLAnimatorControl.UncaughtGLAnimatorExceptionHandler interface to optionally handle
uncaught exception within an animator thread by the user.
Implementation also requires to flush all enqueued GLRunnable instances
via GLAutoDrawable.invoked(..) in case such exception occurs.
Hence 'GLAutoDrawable.flushGLRunnables()' has been added.
Only subsequent exceptions, which cannot be thrown are dumped to System.stderr.
+++
Handling of exceptions during dispose()
Exception in NEWT's disposeGL*() are also caught and re-thrown after
the NEWT window has been destroyed in WindowImpl.destroyAction:
- GLEventListener.dispose(..)
- GLDrawableHelper.disposeAllGLEventListener(..)
- GLDrawableHelper.disposeGL(..)
- GLAutoDrawableBase.destroyImplInLock(..)
- GLWindow.GLLifecycleHook.destroyActionInLock(..)
- WindowImpl.destroyAction on NEWT-EDT
- WindowImpl.destroy
Further more, exceptions occuring in native windowing toolkit triggered destroy()
are ignored:
- GLAutoDrawableBase.defaultWindowDestroyNotifyOp(..)
It has to be seen whether such exception handling for
dispose() shall be added to AWT/SWT.
+++
TestGLException01NEWT covers all GLEventListener exception cases
on-thread and off-thread (via animator).
+++
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLAutoDrawable processing [part-2]
In case of an exception thrown within an GLEventListener
called off-thread by Animator:
- Animator shall stop
- Animator shall forward the exception
GLDrawableHelper shall also flush all queued GLRunnable tasks
in case of an exception, so that another thread waiting until it's completion
is notified and continues processing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLAutoDrawable processing [part-1]
Implements Specification as described on 'Bug 1039 Comment 1'
<https://jogamp.org/bugzilla/show_bug.cgi?id=1039#c1>
TODO:
- Offthread exception handler
++++
GLDrawableHelper is used in all GLAutoDrawable implementations
and for most operations.
GLAutoDrawable/GLDrawableHelper invoke(..) method:
- invoke(..) forwards a caught exception
- if blocking, it forwards an exception
happening within the passed GLRunnable(s).
Here the exception is caught, printed
and then thrown by invoke itself.
- if non-blocking, an exception
happening within the passed GLRunnable(s)
will be thrown in the thread issuing it's execution,
i.e. display() call.
Here the exception is not caught and simply thrown
by the GLRunnable.
GLAutoDrawable.destroy() -> GLDrawableHelper.disposeGL(..) method:
- disposeAllGLEventListener() being invoked by disposeGL(..),
catches exception thrown by GLEventListener.dispose(..)
and prints them to stderr.
The first caught exception is re-thrown at the end as an GLException.
- disposeGL() catches re-thrown GLException by disposeAllGLEventListener()
for GLEventListener.dispose(..)
and re-throws it when operation is complete.
- disposeGL() catches an exception thrown at context destruction or release
and re-throws it when operation is complete.
An early exception at context.makeCurrent() is _not_ caught,
since it is the first operation which simply shall unwind the stack.
GLAutoDrawable.display() -> GLDrawableHelper.invokeGLImpl(..) method:
- invokeGLImpl(..) for display() follows disposeGL() mechanism, i.e.
it catches exception thrown at
GLEventListener's init(..), reshape(..) and display(..) methods
and re-throws it when operation is complete.
It also catches an exception thrown at context release
and re-throws it when operation is complete.
An early exception at context.makeCurrent() is _not_ caught,
since it is the first operation which simply shall unwind the stack.
++++
None of the above thrown exception shall be caught and suppressed
on the caller side.
If an operation must be completed while an exception is caught,
it shall be cached and re-thrown after the operations.
In case multiple exception at multiple places are caught within
an operation, they all shall be cached and the first one
shall be re-thrown.
In case of multiple exception from the same place,
i.e. a loop through all GLEventListener,
the first shall be cached and re-thrown after operation is completed.
It has to be determined, whether we like to dump the exceptions,
especially the ones who get suppressed in case of multiple exceptions.
|
|
|
|
| |
GLDrawableUtil.swapGLContextAndAllGLEventListener is safe: Add Accumulator Buffer bits
|
|
|
|
|
|
|
|
|
|
| |
In certain cases, it is required to read the user requested capabilities
from places other than the user code.
Hence adding public method to GLDrawable interface.
This removes the need to cast to private GLDrawableImpl,
which included such method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLDrawableUtil.swapGLContextAndAllGLEventListener is safe (Doesn't work w/ pre MSAA onscreen drawable)
GLDrawableUtil.isSwapGLContextSafe(..) allows user to query whether 'we think' it's safe
to utilize swapping of GLContext between GLAutoDrawable instances.
Currently known unsafe cases are:
- between on- and offscreen and one of the following:
- MSAA involved, or
- STEREO involved
Enhanced unit tests in this regard:
- TestGLContextDrawableSwitch02AWT
- using GLContextDrawableSwitchBase0
- TestGLContextDrawableSwitch02NEWT
- using GLContextDrawableSwitchBase0
Utilized safe query for setupPrint(..) action in:
- AWT GLCanvas
- AWT GLJPanel
- NewtCanvasAWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ARB_create_context'
Commit e5a55ede324ce500f50991d56491758803063a58 was incomplete,
i.e. it lacked the required mappings for the non ARB profile, i.e.:
GL4bc -> GL3bc, etc.
These profile mappings have been added now.
+++
Further more, GLContext's profile queries, isGL*()
test the ctxOptions for CTX_IS_ARB_CREATED.
This has to be removed to properly work w/ Skip 'ARB_create_context'.
To remove the risk of inconcistency, i.e. context created via ARB and non-ARB,
the 'GLX/WGL profile >= GL3 via non ARB' validation removed
in commit e5a55ede324ce500f50991d56491758803063a58 has been brought back
and refined. Note:
if( glp.isGL3() && createContextARBTried ) {
// We shall not allow context creation >= GL3 w/ non ARB methods if ARB is used,
// otherwise context of similar profile but different creation method may not be share-able.
.. THROW EXCEPTON ..
}
This limited validation removes the possibility of such having a context
of same profile, one created via ARB and one without.
Hence also validates the isGL*() change, where the CTX_IS_ARB_CREATED criteria is removed.
+++
Note regarding commit 7314b47ae1e42997e9e6974b84709640f0ac2a1b (revert):
While analyzing the mapping, it turns out that commit c8b99d197769eaec53c2def562c0ef3fc0e6a9d2
"Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing)"
is not fully consistent with GLProfile's and GLContext's profile queries, i.e. isGL*().
We may reiterate over this change .. but have it be reverted for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ARB_create_context' context creation extension via property 'jogl.disable.openglarbcontext'; ...
Only allow the exclusions if platform OS is not OSX:
- jogl.disable.openglcore
- jogl.disable.openglarbcontext
Since on OSX they are known to work reliable and there is not other method
if receiving a higher GL profile than core and ARB.
This also removes the restrictions on X11 and Windows,
where profiles >= GL3 must be created using ARB_create_context.
Hence this is allowed now.
|
|
|
|
|
|
| |
profiles via property 'jogl.disable.openglcore'
Also moved all GL profile properties to GLProfile class and made them public for better documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow FixedFunctionHook to properly determine it's identity
BuildComposablePipeline: Handle synthetic isGL* and getGL* more generic, allow using a prologue hook
as needed for FixedFunctionHook's 'isGL*core()', 'isGLES*Compatible()' and 'getGLProfile()' methods.
The latter FixedFunctionHook take the emulated GL profile GL2ES1 into account,
allowing JOGL code to assume only having GL2ES1 available.
Otherwise methods like Texture.enable(..) would skip the glEnable(TEXTURE_2D)
call and FixedFunctionHook could not enable it's usage.
GLProfile received a 'public static GLProfile createCustomGLProfile(final String profile, final GLProfile profileImpl)'
allowing utilities like FixedFunctionHook to create a generic profile.
BuildComposablePipeline sorts the methods before emitting for better readability.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
side vertex arrays
Commit 6136457f10d020c779adc78641d0048f77ab1635 defined hasNoDefaultVAO() as [ GL4, GL3, GLES3 ],
however ES 3.x still supports (deprecated):
- client side vertex arrays
- default vertex array object (VAO)
Setting a custom VAO leads to GL_INVALID_OPERATION for client side vertex arrays
used w/ glVertexPointer(..).
Hence removing GLES3 from hasNoDefaultVAO().
|
|
|
|
|
|
|
|
|
| |
use an FBO TextureAttachment if required
We only require an FBO TextureAttachment if using GLSL vertical flip,
otherwise we simply requires a color renderbuffer.
Further, the 'FBO fboFlipped' in GLSL vertical flip mode also simply requires a color renderbuffer.
|
| |
|
|
|
|
| |
'jogl.debug.GLJPanel.Frames' is defined
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for a Colorbuffer, also make DEPTH optional.
API Change
+++
In certain cases a TextureAttachment for the FBO's color buffer
is not desired, either for performance reasons where texture functionality
is not required or to avoid texture restrictions like size, etc.
+++
GLFBODrawable shall use TextureAttachment for the FBO's color buffer
and a DEPTH buffer per default.
However, the user shall be allowed to use a plain ColorAttachment (renderbuffer)
and also no DEPTH buffer.
+++
FBObject Details:
- Colorbuffer interface exposes Attachment details
like format, size, etc as well as it's implementation
specifics, isTextureAttachment() and getTextureAttachment() allowing a clean cast and type query.
- Allow ColorAttachment to be used for non MSAA
- Make TextureAttachment optional for method 'use(GL, TextureAttachment)'
- Only validate size against MAX_TEXTURESIZE if using a TextureAttachment
- API Change:
- rename: getColorAttachmentCount() -> getColorbufferCount()
- add: getTextureAttachmentCount()
- change 'TextureAttachment getSamplingSink()' -> 'Colorbuffer getSamplingSink()'
|