| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
createContextARBVersions(..) GL Version Validation
String or integer based GL version validation now happens in setGLFunctionAvailability(..)
depending on the requested profile.
Due to the 'strictMatch' argument the method fails early when unsatisfied
also allowing to simplify createContextARBVersions(..) implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PROFILE_ALIASING compat -> core ; Fix setGLFunctionAvailability(..) failure path @ profile query
- Add GLRendererQuirks.GLNonCompliant, marking a GL context/profile non compliant.
Currently: 'Mesa DRI Intel(R) Sandybridge Desktop' && 3.1 compat profile
- Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only)
Detect case using new GLRendererQuirks.GLNonCompliant in setGLFunctionAvailability() and return 'false'.
- No PROFILE_ALIASING compat -> core
Use true core GL profiles / context if available to ensure
proper API behavior across platforms due to different functionality.
E.g. don't use GL3bc if GL3 is requested.
- Fix setGLFunctionAvailability(..) failure path @ profile query
Destroy temp context & zero result to cont. iterating through GL versions.
This missing cleanup lead to returning the faulty GL context handle and it's mapping/usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
creation is not possible on AWT-EDT.
The Intel HD3000 OpenGL driver on Windows will deadlock @ SwapBuffers in case the drawable is created
on a thread other than the window owner thread.
We are aware of such possibilities, nevertheless the AWTEDTExecutor.singleton.invoke(..)
allowed to execute the runnable in case it cannot be invoked on AWT-EDT.
The latter is the case if the current thread is not the AWT-EDT _and_ is holding the AWT tree-lock.
With GlueGen commit 0b43b43f889ad7fc220942b0076e2001ca3cf13f, the invoke method now consumes
an argument allowing to restrict the execution to AWT-EDT only.
In such case, the drawable will be realized at a later time from the AWT-EDT.
Such a situation could be triggered if a Frame's setVisible(true)
is not issued from the AWT-EDT, as it should be!
However, to relax such use cases - we better recognize such possible dealock and avoid it.
|
|
|
|
|
|
|
| |
GLCanvas.displayOnEDT: Also check null!=drawable
As for 1ae0737f34143a5ed655bd9c4d5fe9b0437c7774, an animator may inject a display Runnable on the EDT
before AWT destruction. In case this Runnable is executed after destruction on the EDT - it would fail.
|
|
|
|
|
|
|
|
|
|
| |
GLContextImpl.makeCurrent() - Handle !drawable.isRealized() early, don't catch 'create' Exception
Catching the createImpl() exception could be confusing, since it shall succeed.
Such exception is required to hint a platform bug and to debug it.
Hence testing drawable.isRealized() upfront is preferrable, i.e. catching a well known case
for returning CONTEXT_NOT_CURRENT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLContext/GLDrawable
- Fix Bug 642 TestJSplitPaneMixHwLw01AWT
On Windows platform when mixing hw/lw JSplitPanel,
the GLCanvas is removed and added when splitter is moved.
The lack of robustness (see below) lead to an exception.
Note: Only w/ GLJPanel (no hw/lw mixing) the splitter can be moved
in both direction. Only here it is guaranteed that the GL component
will survive the action.
- Fix AWT-GLCanvas EDT Runnable: swapBuffer().. / display(..)
- Check drawable.isRealized() within the lock on the performing thread.
This is not possible before issuing the EDT Runnable action
since we cannot hold the lock beforehand.
- Robustness GLDrawableImpl
- boolean realized -> volatile boolean realized
- remove 'synchronized' on isRealized() and setRealized(..)
- Use dbl-checked locking on 'realized' test for swapBuffers() and setRealized(..)
- Robustness GLContextImpl
- Catch createImpl(..) exception and properly return CONTEXT_NOT_CURRENT
|
| |
|
|
|
|
| |
GL2ES2.GL_MAX_COLOR_ATTACHMENTS
|
|
|
|
| |
robost while detecting erroneous queried GL version
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLDrawableFactory.createOffscreenDrawable(..) for common OffscreenBackend (dropping pbuffer/software); Flip FBO w/ GLSL texture renderer.
- Implementation is GLProfile agnostic
- Shall work on ES2, GL2, .. etc
- Use GLDrawableFactory.createOffscreenDrawable(..) for common OffscreenBackend (dropping pbuffer/software)
- Leave offscreen selection to common factory code, favoring FBO
- Flip FBO w/ GLSL texture renderer
- Faster on low CPU machines
- Enabled if GL2ES2 and FBO offscreen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operating w/o it; ShaderState: Remove notion of GL context attachment, use pass-through or object association; GLArrayData/GLUniformData: Add basic GLSL location methods
- GLArrayData/GLUniformData: Add basic GLSL location methods
- GLArrayData
- add: setLocation(..) for attribute location/index retrieval (post link) and binding (pre link)
- GLUniformData
- add: setLocation(..) for attribute location/index retrieval (post link)
- GLArrayData/ImmModeSink: Remove implicit dependency on ShaderState - allow operating w/o it
- GLArrayData
- add: 'public void associate(Object obj, boolean enable)', allows setting ShaderState usage
- ShaderState: Remove notion of GL context attachment, use pass-through or object association
- ownsAttribute(..) associates the attribute w/ ShaderState
- removed GL context ShaderState attachment
Tested:
- ImmModeSink w/ GLSL/ES2 w/ and w/o ShaderState
- GLArrayData* w/ and w/o ShaderState
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getOffscreenContextReadBuffer(), .. ; Add GLFBODrawable API entries for multi buffering (no impl. yet); GLJPanel 1st simplification using offscreen drawable
- Cleanup GLContext special entries: getOffscreenContextPixelDataType(), getOffscreenContextReadBuffer(), .. ;
- add: getDefaultReadBuffer() (-> exposed via GLBase as well)
- add: isGLOrientationFlippedVertical()
- add: getDefaultPixelDataType()
- removed impl: getOffscreenContextPixelDataType()
- removed impl: getOffscreenContextReadBuffer()
- removed impl: offscreenImageNeedsVerticalFlip()
- Add GLFBODrawable API entries for multi buffering (no impl. yet);
- TODO: Add implementation code in GLFBODrawableImpl
- GLJPanel 1st simplification using FBO
- Use above new GL/GLContext entries
- Fix: getNativeSurface() and getHandle()
- TODO:
- Remove distinction of 'pbuffer' and 'software',
- Use GLDrawableFactory.createOffscreenDrawable(..)
- Use GL for FBO swapping
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
successfull claim; Also fix intendations of block.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
'sendReshape' for onscreen drawables as well.
|
| |
|
|\
| |
| |
| |
| |
| | |
Fix Bug : Quaternion multiplication unexpected behavior
Matches description in Bug 631
https://jogamp.org/bugzilla/show_bug.cgi?id=636
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
references
Clarify method names:
- update(..) -> updateByPMV(..), updateByPlanes(..)
- isOutside(AABBox) -> isAABBoxOutside(AABBox)
- .. same for point/sphere, while adding 'Location classifyType(..)'
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Frustum: Cleanup / update
- Remove ctor w/ PMV, use update(..) instead - avoid API explosion
- Add update(Plane[]) to copy existing Frustum planes
- Mention world-coordinates in update(PMV)
PMVMatrix: Fix mulPMV
- P*Mv in column major order is correct for Frustum
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the original paper
Paper:
Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix
http://graphics.cs.ucf.edu/cap4720/fall2008/plane_extraction.pdf
Authors (in alphabetical order):
Gil Gribb <[email protected]>
Klaus Hartmann <[email protected]>
06/15/2001
Fix:
- Column Major Order PMV (Passing to Frustum and in calculation itself) according to paper coeff. calculation of plane
- Plane's signed distance function (only add d, don't multiply)
- Normalization: divide by lenght, not multiply
|
| |
|
| |
|
|
|
|
| |
non-hardware-accelerated capabilities are requested, because only updateGraphicsConfigurationGDI provides software rendering capabilities.
|
|
|
|
| |
/ check size() > 0, since List can be modified by listener itself
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
| |
Don't store passing PMV reference. isInside() -> isOutside()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
PMVMatrix: Add getPreMultipliedPMV(..)
- Independent / Compile Clean
- Remove OpenMALI dependencies
- Use basic float[] type and FloatUtil
- Use AABBox - FIXME: May need BBox (no axis alignment ?!)
- Relocation
- Move to com.jogamp.opengl.math.geom (see commit 5fafc1ac360333645b807dcd8dff0c0a655ea439)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
com.jogamp.opengl.math.geom packages
Note: WIP - We may relocate / reorg math package.
Public relocations:
com.jogamp.opengl.util -> com.jogamp.opengl.math
- FixedPoint
- FloatUtil
com.jogamp.graph.math -> com.jogamp.opengl.math
- Quaternion
- VectorUtil
com.jogamp.graph.geom -> com.jogamp.opengl.math.geom
- AABBox
VectorUtil:
Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances
to be used 'graph' agnostic and to document 2d/3d use-cases.
|
| |
|
| |
|
|
|
|
| |
on OpenMALI - hence broken.
|
|
|
|
|
|
|
|
|
|
| |
dbc260bd2e917ee9001461749c99da0c9cbfaf9a
- init(..): Query MAX_COLOR_ATTACHMENTS: Remove erroneous samplingSink null check (it's always null)
- reset(..): Create & construct samplingSink if required and missing before detaching all (due to bind)
- setSamplingSink(..) returns previous samplingSink
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
samplingSink*
|
|
|
|
| |
setSamplingSink(..). Create MSAA samplingSink lazy if null.
|
|
|
|
|
|
|
| |
b83b068c0f426f24a58e2bd9f52de9ebd0c7876d, sync GL command stream before FBO reconfig
Even though we currently have no bug experienced on this, it seems to be a good idea for
highly concurrently GL driver implementations.
|
|
|
|
|
|
|
| |
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);
|
|
|
|
|
|
| |
and after ctx/drawable swap - sync'ing GL state
Otherwise a driver crash may occur on Windows/NVidia.
|
|
|
|
| |
pause/stop - taking execution frequency into account
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|