| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLCapabilities on X11 (feature complete)
To allow custom GLCapabilities, we had to use native parenting on X11 w/ a new child window.
The desired visualID chosen by the users GLCapabilities is passed to the new child window.
The redraw drops must be caused by the original GDK or the new child GDK window.
Now we use a plain X11 child window similar to NEWT's X11 window and NewtCanvasSWT,
which doesn't expose this bug.
(Note: SWTAccessor/GLCanvas still contains the uncommented GDK code path for further inspection, if desired)
Also added SWTNewtEventFactory to test event handling on the SWT GLCanvas w/ GearsES2.
TestSWTJOGLGLCanvas01GLn tests custom GLCapabilities now.
SWTEDTUtil has been moved to private: com.jogamp.newt.swt -> jogamp.newt.swt.
|
|
|
|
|
|
|
|
|
|
| |
remove just introduced setVisible(false) and adapt to setEDTUtil() changes. ; Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow.
- SWT GLCanvas/NewtCanvasSWT: Check isVisible() @ validation
- NewtCanvasSWT remove just introduced setVisible(false) and adapt to setEDTUtil() changes
- Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow.
|
|
|
|
|
|
|
|
|
|
|
| |
NewtCanvasSWT asyncExec(..) bug w/ native parenting
The unit test shows, that while using JOGL's SWT GLCanvas Display's asyncExec(..) works properly,
but w/ NewtCanvasSWT on Windows does not.
NewtCanvasSWT differs w/:
- Using native parenting [Newt GLWindow to SWT Canvas]
- Processing native events in own NEWT EDT, w/ own Windows dispatch hook [For the child GLWindow only]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DisposeListener; Run GL tasks on current thread w/o restrictions
Fix dispose bug, check for isDisposed() and add DisposeListener
- Don't issue SWTAccessor.setRealized(..), since it's called implicit via super.dispose()
- Check isDisposed() ..
- add DisposeListener to act on parent's disposal (Shell, Composition, ..)
Run GL tasks on current thread w/o restrictions
+ * The current thread seems to be valid for all platforms,
+ * since no SWT lifecycle tasks are being performed w/ this call.
+ * Only GL task, which are independent from the SWT threading model.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
TestNewtCanvasSWTBug628ResizeDeadlock
- Fix deadlock situation in waitUntilStopped/Idle(), skip if on AWT/SWT EDT
- Use RunnableTask for sync task invocation, don't block AWT/SWT EDT.
- Cleanup TestNewtCanvasSWTBug628ResizeDeadlock (works on OSX as well)
|
|
|
|
| |
how to run partial junit tests
|
|
|
|
|
|
| |
possible triggered locking action, i.e. display(). Do the same for AWTEDTUtil.
This fix actually clarifies the annotated FIXME :)
|
|
|
|
|
|
|
|
|
|
| |
caps/pixelformat w/ chosen GLProfile only
Using a pixelformat w/ chosen stencil for CALayer does corrupt rendering for an unknown reason,
probably due to incompatible pixelformat w/ CALayer composition.
This patch simply discards any special chosen caps, while only recognizing the desired GLProfile
for the FBO CALayer pixelformat.
|
|
|
|
|
|
|
|
|
| |
methodology as for Mvi and Mvit
Allows user to derive Frustum from updated P + MV
Clarify method name for clearing all update request:
- disableMviMvitUpdate() -> clearAllUpdateRequests()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JAWTWindow.lockSurface(): Check AWT component's native peer
- Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context
- It is possible to have the GLContext not being created (not made current),
so drawable shall be disposed independent.
- Merge Runnable 'postDisposeOnEDTAction' to dispose Runnable for clarity
- GLDrawableHelper: Split disposeGL from invokeGLImpl for clarity
- JAWTWindow.lockSurface(): Check AWT component's native peer
- W/o a native peer (!isDisplayable()), JAWT locking cannot succeed.
- On OSX OpenJDK 1.7, attempting to JAWT lock a peer-less component crashes the VM
- MacOSXJAWTWindow.lockSurfaceImpl(): Remove redundant null checks
|
|
|
|
|
|
|
| |
destruction of drawable
Lack of finishing the GL command stream lead to a SIGSEGV on Windows w/ Nvidia driver
where probably pending GL commands were still being processed concurrently.
|
|
|
|
|
|
|
|
|
|
| |
c002e04f848116922a1ed7bd96ead54961649bbd
As suggested by Julien Gouesse, align 'enqueue(..)' method w/ 'invoke(..)':
- public void enqueue(GLRunnable glRunnable);
+ public boolean invoke(boolean wait, List<GLRunnable> glRunnables);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 77db6a5c22cb4a53cf911b4caf57127770c70968
[1] - The AWT/Applet test case on OSX utilized offscreen CALayer, which is correct.
[2] - the GLEventListener.display(..) method calls Frame.setTitle(".."); which is correct,
but freezes when called right after GLEventListener.init(..)
BUG on OSX/CALayer: If frame.setTitle() is issued right after initialization
the call hangs in
at apple.awt.CWindow._setTitle(Native Method)
at apple.awt.CWindow.setTitle(CWindow.java:765) [1.6.0_37, build 1.6.0_37-b06-434-11M3909]
Happens w/ Oracle's JRE7u9 as well!
Workaround:
- Set 'justInitialized' flag in GLEventListener.init(..)
- Clear 'justInitialized' flag in GLEventListener.display(..) at the end
- Skip Frame.setTitle(..) in GLEventListener.display(..) if 'true == justInitialized'
Somebody may send a bugreport to Oracle / OpenJDK.
|
|
|
|
| |
using Applet as component which provokes offscreen FBO layer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX - Adding a similar one w/o deadlock and less framework bits.
Andres Colubri reported a test case in the forum:
<http://forum.jogamp.org/Thread-blocking-issue-with-AWT-but-not-NEWT-on-OSX-td4026674.html>
Which is now included as TestGLCanvasAWTActionDeadlock01AWT.
A similar w/ less framework bits and w/o dealock is also included as TestGLCanvasAWTActionDeadlock00AWT.
A followup commit will incl. a fix after further analysis.
A commit at this point where TestGLCanvasAWTActionDeadlock01AWT still freezes on OSX is done
to be able to reproduce the bug and see the fix as a patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(API Change) ; Added GLDrawableUtil
A GLEventListener resides in two states, initialized and uninitialized.
When added to a GLAutoDrawable, it is uninitialized.
A first 'display()' will issue GLEventListener's 'init(..)' which renders it initialized.
This is usually accompanied by 'reshape(..)' propagating the drawable's dimension.
Destruction of the GLAutoDrawable will issue GLEventListener's 'dispose(..)' which renders it uninitialized.
It turns our these means of GLEventListener controls are not sufficient in case
the user requires to remove and add them during the lifecycle and rendering of their GLAutoDrawable host.
GLAutoDrawable 'removeGLEventListener(..)' merely removes the GLEventListener from the list,
but does not complete it's lifecycle, i.e. issues 'dispose(..)' if initialized to realease GL related resources.
Hence the following essential API changes are made to complete the lifecycle:
+ public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove);
disposing a single GLEventListener, allowing it's removal from the list being optional
This is demonstrated via GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b), see below.
++++++++
Further more the following API changes were made to expose complete control of
GLEventListener to the user:
- public void removeGLEventListener(GLEventListener listener);
+ public GLEventListener removeGLEventListener(GLEventListener listener);
The return value allows simple pipelining, and also delivers information whether
the passed listener was actually removed.
- public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException;
+ public int getGLEventListenerCount();
+ public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException;
Dropping the redundant removal by index, while adding count and get methods.
+ public boolean getGLEventListenerInitState(GLEventListener listener);
+ public void setGLEventListenerInitState(GLEventListener listener, boolean initialized);
Allows retrieving and setting of listener states.
All in all these API changes allows a user to experience all freedoms in dealing w/
GLEventListeners hosted by GLAutoDrawable impl. and shall be future proof.
Note that we have avoided the Iterator pattern due to it's overhead of temporal objects creation.
The simple indexed access allows us to implement each method as an atomic operation.
+++++++++++
Further more a simple enqueue(..) method has been added, allowing to just enqueue a GLRunnable
w/o provoking it's execution - as invoke(..) does.
This method pleases a use case where GLRunnables are batched and shall be executed later on..
public boolean invoke(boolean wait, GLRunnable glRunnable);
+ public void enqueue(GLRunnable glRunnable);
+++++++++++
Added GLDrawableUtil, exposes utility function to rearrange GLEventListener, modifiy GLAutoDrawable, etc.
GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b)
is tested and demonstrated w/ TestGLContextDrawableSwitchNEWT.
Manually tested on X11, OSX and Windows.
|
|
|
|
|
|
| |
keyChar from pressed/released may be wrong (Uppercase: SHIFT-1, etc ..)
Partially reverts commit: b62e1d027c289877686d6008ea8dd40e4e1541ec
|
|
|
|
| |
reparenting TestParentingFocusTraversal01AWT
|
|
|
|
| |
Shader program name is valid if non-zero.
|
|
|
|
|
|
| |
reduce buffer usage (performance) in favor of float[].
Thomas De Bodt reported this error and provided the unit test.
|
|
|
|
|
|
|
|
| |
(GL3), use GL3.2 compatible shader; Use VBO in general.
Covered by:
Auto unit tests: TestOffscreenLayer01GLCanvasAWT, TestOffscreenLayer02NewtCanvasAWT
Manual: TestGearsES2AWT '-gl3 -layered'
|
|
|
|
| |
add forceGL3; TextureDraw01ES2Listener uses defaultShaderCustomization()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
modified flags and modifier-key events; Simplify Windows key handling
Preface: Modifier-keys are SHIFT, CTRL, ALT and META and they have a matching modifier-bit.
- Simplify Windows key handling
- Employ MapVirtualKey(..) for virtual-key to character and scancode to virtual-key mappings,
allowing to drop tracking of keyCode to keyChar in java code.
This also removes the platform restriction of delivering keyChar at TYPED only.
- Deliver keyChar w/ pressed and released
- Due to the lift restriction on the Windows platform (see above),
we can deliver keyChar w/ all key events on all platforms.
- Deliver proper modified flags and modifier-key events
All modifier-keys deliver pressed, released and typed events
with their modifier-bit set.
The above is covered by unit tests, which passed on X11, Windows and OSX (manual test run).
|
|
|
|
| |
TestNewtKeyPressReleaseUnmaskRepeatAWT: Enable NewtCanvasAWT test
|
|
|
|
| |
85851c9839d620bcbbd07b6ca833f1a5901831cc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLContextImpl: Bind default VAO if having quirk RequiresBoundVAO.
OSX w/ OpenGL >= 3 core context implementation requires a bound VAO for vertex attribute operations,
i.e. VertexAttributePointer(..). This has been experienced on OSX 10.7.5, OpenGL 3.2 core w/ Nvidia GPU
and in several forum posts. Such 'behavior' violates the GL 3.2 core specification,
which does not state this requirement, hence it is a bug. (Please correct me if I am wrong!)
GLContextImpl works around this quirk, by generating a default VAO and binds it at 1st makeCurrent (@creation)
and deletes it at destroy. This is minimal invasive since no action is required for subsequent makeCurrent or release.
We assume if a user uses and binds a VAO herself, she will mind this quirk.
Note: We could enhance this workaround by quering for a currently bound VAO at makeCurrent() and bind our default if none.
However, we refrain from this operation to minimize the workaround and complexity.
|
|
|
|
|
|
|
| |
- X11: Add VK_QUOTE mapping
- OSX: Add single shift, ctrl alt key press;
Fix mapping: Command -> Windows, Option -> ALT, add BACK_QUOTE and QUOTE.
|
|
|
|
| |
bitfield, use more IntBitfield.put(..) return value for efficiency.
|
|
|
|
|
|
|
|
|
|
| |
incl. auto-repeat)
- Using keyCode (bit) maps to isPressed and isAutoRepeat, allowing use of multiple keys
- Enhance unit test TestKeyEventOrderNEWT w/ injecting variations of 2 diff. keys
- Manual tested on X11, Windows and OSX w/ and w/o auto-repeat
|
|
|
|
|
|
|
|
|
| |
and w/o auto repeat. Incl. fix for Windows.
Auto-Repeat tests recognizes whether auto-repeat could be triggered by AWT Robot.
The latter is not possible on Windows, hence manual testing was required on this platform.
Impact: X11, Windows and OSX produce proper key sequence incl. auto-repeat modifier mask.
|
| |
|
|
|
|
| |
fourth element was invalid
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GL_POINT_SOFT and dist/fade attenuation (Adding basic POINT unit tests)
gl_PointSize (and all other uniform array elems) was not propagated due to wrong usage of GLUniformData component param.
Due to efficiency, we use vec4[2] now and #defines in shader to easy readability.
GL_POINT_SOFT uses gl_PointCoord to determnine inside/outside circle position
while adding a seam of 10% in/out. This almost matches 'other' implementations and gives a nice smooth circle.
!GL_POINT_SOFT produces a proper square (billboard).
Point-Vertex shader takes dist/fade attentuation into account.
|
|
|
|
| |
Tested manual w/ TestGearsES2NEWT on Raspberry Pi
|
|
|
|
| |
according it's usage (update Mvi/Mvit only if lighting is being used)
|
|
|
|
| |
imm. gl* functions; Default color padding is 1f; Make fields private.
|
|
|
|
| |
properties, drawIndices QUAD w/ proper range and add uint; FixedFunctionHook: drawIndices QUAD w/ proper range and add uint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
923d9dd7f1d40db72d35ca76a761ca14babf147f
We are aware that Google's ANGLE (Windows EGL/ES2 impl. based on D3D)
crashes using eglInitialize(..) w/ EGL_DEFAULT_DISPLAY.
Commit 923d9dd7f1d40db72d35ca76a761ca14babf147f moved the EGL device initialization
into the EGLDrawableFactory ctor and hence slipped out ANGLE workaround to disable it per default.
- Moving property static flags from GLProfile -> GLDrawableFactory
- Moving ANGLE workaround right into EGLDrawableFactory (where it belongs)
- Moving optional EGL/ES disable code to GLDrawableFactory (where it belongs)
Tested on Windows w/ Java-32bit and latest Chrome ANGLE DLLs
|
|
|
|
| |
GL_QUAD_STRIP/GL_POLYGON/GL_QUADS mapping, glTexImage2D internalformat/format match.
|
|
|
|
| |
required (similar sanity checks as enableBuffer())
|
|
|
|
| |
combinations, plus texture usage)
|
|
|
|
|
|
|
|
| |
- Button 9 has been reported to be sent by Olamedia
- Rearrange the input bit mask in InputEvent (API Change)
- Raise the max. button number to 16
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Colorbuffer w/ diff size leads to GL_FRAMEBUFFER_UNSUPPORTED.
This occured at least on:
- OS X 10.6.8
- GL_RENDERER NVIDIA GeForce 7300 GT OpenGL Engine
- GL_VERSION 2.1 NVIDIA-1.6.36
Remedy is to catch the exception @ GLFBODrawableImpl.reset(..) and switch over to
fallback 'reset' method:
FBO reattachment -> FBO complete recreation
Of course, the FBO recreation is noticable slower,
but at least it seems to work on the offending system.
Not tested on the offending system, but manually provoked GLException on FBOObject
to trigger fallback, which is working here.
|
|
|
|
| |
just assume it's the SW renderer, flipping.
|
|
|
|
|
|
|
|
| |
The lock being claimed at validateGLDrawable() is 'offthread', i.e. may fight w/ AWT / Animator
at reshape/display.
Locking is moved 'down' to AWT runnable 'setRealizedOnEDTAction', which also double checks
the drawable [again].
|
|
|
|
|
|
| |
If DEPTH_STENCIL was selected, recreate destroyed the common buffer when stencil was being 'reset'.
To unify and simplify code, if DEPTH_STENCIL stencil == depth reference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reshape() ; GLCanvas.reshape() only if drawble valid ; GLCanvas.validateGLDrawable() also test isDisplayable() ; Fix size validation ; resizeOffscreenDrawable(..) don't validate 'safe' size 1x1
- GLCanvas.validateGLDrawable() @ display() and reshape()
To help users using GLCanvas w/ having a realized GLCanvas/Drawable,
validateGLDrawable() is also called at reshape().
This shall ensure a valid drawable after even a non AWT-EDT issued first setVisible().
- GLCanvas.reshape() only if drawble valid
Otherwise offscreen reshape attempts would happen even on unrealized drawable,
which is not necessary.
- GLCanvas.validateGLDrawable() also test isDisplayable()
To make sure the native peer is valid, also test isDisplayable()
- Fix size validation
Since we have experienced odd size like 0 x -41
test each component, i.e. 0 < width && 0 < height.
This is done through all JOGL/NEWT components.
- resizeOffscreenDrawable(..) don't validate 'safe' size 1x1
In case method is called w/ odd size, i.e. 0 x -41,
the safe size 1x1 is used. However, we cannot validate this size.
Dump WARNING if odd size is detected.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- No NewtCanvasSWT resize, nor input event delivery.
A new EDTUtil instance is not started automatically.
Since SWTEDTUtil is attached to the DisplayImpl later in time, i.e. after it's native creation,
there is no EDTUtil.invoke(..) call which started it.
The not started SWTEDTUtil could not deliver any events.
Fix: Start it explicitly - add API doc comment in Display.setEDTUtil(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(jogl-all-android.jar, jogl-test-android.jar) if android SDK JAR files are available. ; Split up atomic jogl-util.jar
Compile and generate android JAR files (jogl-all-android.jar, jogl-test-android.jar) if android SDK JAR files are available.
- See gluegen commit 55b4552aef7882c358d545d020d6f12c958ed8ed
Also split up atomic jogl-util.jar
- jogl-util.jar -> jogl-util.jar + jogl-util-graph.jar
Footprint Stats:
This demonstrates small footprint of a minimum configuration,
all numbers in kilobytes (du -ksc).
NOTE the min size of ~ 1MB!
JOGL ALL
220 kB gluegen-rt.jar
5180 kB jogl-all.jar
4 kB libgluegen-rt.so.gz
4 kB libnativewindow_awt.so.gz
12 kB libnativewindow_x11.so.gz
100 kB libjogl_desktop.so.gz
20 kB libnewt.so.gz
5540 kB total
JOGL Min X11 Min egl es1 es2
220 kB gluegen-rt.jar
296 kB atomic/jogl-core.jar
156 kB atomic/jogl-glmobile.jar
284 kB atomic/jogl-util.jar
76 kB atomic/nativewindow-core.jar
120 kB atomic/newt-core.jar
28 kB atomic/nativewindow-os-x11.jar
28 kB atomic/newt-driver-x11.jar
4 kB libgluegen-rt.so.gz
48 kB libjogl_mobile.so.gz
12 kB libnativewindow_x11.so.gz
20 kB libnewt.so.gz
1292 kB total
JOGL Android - mobile egl es1 es2
224 kB gluegen-rt-android.jar
3020 kB jogl-all-android.jar
4 kB libgluegen-rt.so.gz
48 kB libjogl_mobile.so.gz
3296 kB total
JOGL Min Android/Mobile Min egl es1 es2
224 kB gluegen-rt-android.jar
296 kB atomic/jogl-core.jar
156 kB atomic/jogl-glmobile.jar
8 kB atomic/jogl-os-android.jar
284 kB atomic/jogl-util.jar
76 kB atomic/nativewindow-core.jar
120 kB atomic/newt-core.jar
28 kB atomic/newt-driver-android.jar
4 kB libgluegen-rt.so.gz
48 kB libjogl_mobile.so.gz
1244 kB total
|