| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
block until all master's GLEventListener.init(..) methods have been called
Better shared GLAutoDrawable synchronization.
Block slave instances to also block until all master's GLEventListener.init(..) methods have been called
- GLSharedContextSetter: Add areAllGLEventListenerInitialized()
- GLCanvas (SWT, AWT)
- GLJPanel
- GLAutoDrawableBase (GLWindow, ..)
- GLDrawableHelper's isSharedGLContextPending(..)
takes 'areAllGLEventListenerInitialized()' into consideration
allowing to block the slave creation until master is completed.
This solves teh use case, where the master creates resources in it's
GLEventListener initialization (buffers), which are shared with
it's slaves.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capabilities to GLArrayDataServer and add unit tests
GLArrayDataServer:
- Add create*Mapped(..) variants for GPU mapped buffer usage
w/o client buffers.
- Fix API documentation (arguments)
- Fix 'addGLSLSubArray(..)'
- properly compute and pass 'subStrideB' in bytes to GLArrayDataWrapper ctor.
- Add 'mapStorage(..)' and 'unmapStorage(..)'
allowing to map the GPU buffer.
GLArrayDataWrapper:
- Fix getElementCount(): Consider stride in bytes and consider 'mappedElementCount'
- getSizeInBytes(): Consider 'mappedElementCount'
Tests:
- Use new GLBase methods, e.g. getBoundBuffer(..) instead of glGetBoundBuffer(..)
- TestMapBufferRead01NEWT: Validate GLBufferStorage (i.e. GLBufferObjectTracker)
- Add RedSquareMappedES2 using GPU mapped buffer
- Test w/ TestRedSquareES2NEWT, cmd-line 'mappedBuffers'
- GearsES1 and GearsES2: Add GPU buffer mapping mode for all test cases
- Add buffer validation mode, i.e. test whether GLBufferObjectTracker
works properly.
- Test w/ TestGearsES2NEWT, cmd-line 'mappedBuffers'
- TestSharedContextVBOES2NEWT0, TestSharedContextVBOES2NEWT3:
- Add GPU mapped buffers tests to validate GLBufferObjectTracker
code path with shared GLContext across multiple threads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
synchronized and secure [1/2]
GLBufferSizeTracker becomes GLBufferObjectTracker
and tracks the buffer's data store, GLBufferStorage, accurately, synchronized and secure.
Synchronization is required, since the GLBufferStorage can be
shared across many GLContext on multiple threads.
This requires all GLBufferStorage lifecycle affecting GL functions
to utilize synchronized GLBufferObjectTracker methods
while passing a native GL-func callback.
These GL functions are:
- glBufferData, glBufferStorage (GL 4.4), glNamedBufferDataEXT
Creating the GLBufferStorage object
- glMapBuffer, glMapBufferRange, and their *Named*EXT variants
- glUnmapBuffer, glUnmapNamedBufferEXT
'glDeleteBuffers' can simply notify the GLBufferObjectTracker
No more HashMap is required to associate the mapped buffer address
to the mapped ByteBuffer.
GLBufferObjectTracker simply utilizes a
buffer-name (int) -> GLBufferStorage
map.
+++
The security aspect shall be implemented by validating all arguments
whether they match the required GL constraints,
as well as validating tracked states like 'size'.
The following functions will throw an GLException accordingly:
- glBufferData, glNamedBufferDataEXT
* @throws GLException if size is less-than zero
* @throws GLException if a native GL-Error occurs
- glBufferStorage (GL 4.4)
* @throws GLException if size is less-or-eqaul zero
* @throws GLException if a native GL-Error occurs
- glMapBuffer, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
- glMapBufferRange, and it's *Named*EXT variant
* @throws GLException if buffer is not bound to target
* @throws GLException if buffer is not tracked
* @throws GLException if buffer is already mapped
* @throws GLException if buffer has invalid store size, i.e. less-than zero
* @throws GLException if buffer mapping range does not fit, incl. offset
- glMapBufferRange, and it's *Named*EXT variant
Only clear mapped buffer reference of GLBufferStorage
if native unmap was successful.
Further more special error handling shall be applied to:
- glMapBuffer, and it's *Named*EXT variant,
glMapBuffer, and it's *Named*EXT variant
- A zero GLBufferStorage size will avoid a native call and
returns null
- A null native mapping result indicating an error will
not cause a GLException but returns null
This allows the user to handle this case.
|
|
|
|
| |
targets
|
|
|
|
| |
shared bufferSizeTracker
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f8a74c9831c65725a699320c27e62161a0378241 reverted
commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1
due to the fact that the buffer binding itself is _not_
shared across shared GLContext!
Apply uncritical changes of 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1:
+++
Simplify GLBufferSizeTracker creation @ GLContextImpl ctor,
make it final.
+++
Clear the GLBufferSizeTracker (@destruction) only if no more
created shares are left!
+++
Refine API doc.
+++
|
|
|
|
|
|
| |
and GLBufferSizeTracker (simplification)"
This reverts commit 7c5483d5b20aed9c87c5ce3f6bc840b6546edcd1.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GLBufferSizeTracker (simplification)
Due to future mapped buffer tracking, the GLBufferStateTracker instance shall be shared
across shared GLContextImpl instances similar to GLSizeStateTracker!
This allows us to merge GLSizeStateTracker code into GLBufferStateTracker
to simplify the implementation.
+++
Clear the GLBufferStateTracker (@destruction) only if no more
created shares are left!
+++
|
|
|
|
|
|
| |
Re-adding 'equals(..)' method erroneously removed with commit 8457bf35fee253d9af29ff1150a9671f6896fc17.
'equals(..)' is important to allow the HashMap<> for glMapBuffer(..) work properly!
|
|
|
|
| |
visibility helping robostness of test case.
|
|
|
|
| |
override cached visibleOpacity w/ forced zero when called twice
|
| |
|
|
|
|
|
|
| |
BE's 'grey', which is used for the filename
Same as 42d3b31d1becd8eb8e2847c87e14e47e15e730cd
|
|
|
|
| |
error / Add test method 'invokeAndWaitError(..)'
|
|
|
|
|
|
| |
'isVisible()' determining actual on-screen showing state
See commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplify JAWTComponentListener's HierarchyListener:
- Don't interfere w/ Component's visibility anymore!
This shall reduce sideeffects.
Utilize 'isShowing' in each Component specialization, i.e. GLCanvas.
- On SHOWING_CHANGED if a parent caused a change
of the tracked components showing state,
propagate it to the offscreen-layer!
- Remove all other complicated states!
GLCanvas, GLJPanel:
- Instead of 'isVisible()' use 'showing state',
since only the 'showing state' reflects 'true' visibility
throughout the hierarchy.
- Add HierarchyListener and track volatile showing state
to be used instead of 'isVisible'.
Using a cached showing state is more efficient
than quering 'isShowing()' all the time!
NewtCanvasAWT:
- Use 'isShowing()' instead of 'isVisible(), see above
|
|
|
|
|
|
|
|
| |
!drawable.isRealized() - similar to it's recreateDrawable() and test only _after_ having the surface lock!
Only after the surface lock we are thread safe.
In case drawable has been pulled, do nothing ..
|
|
|
|
| |
obsolete 'getPrivateGraphicsConfiguration()'
|
|
|
|
|
|
|
|
|
|
|
| |
*Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments ..
Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage.
Most beneficary here is OSX and the GLDebugMessageHandle,
both managed the JVM handle on their own - removed now.
Also ensuring that *Common_init(..) is called for all modules on all platforms.
|
|
|
|
| |
missing XFree(..) calls and argument checks.
|
|
|
|
| |
'grey', which is used for the filename
|
| |
|
|
|
|
|
|
|
|
| |
Impl. manages up-to 32 windows (BCM layer elements) - dunno whether this is a proper value.
Note: Layer 2000 is reserved for out PointerIcon.
Removed 'dead code'.
|
| |
|
|
|
|
|
|
| |
Intercept sendMouseEvent(..)
Intercepting 'sendMouseEvent(..)' to reduce the lag (time) and listener footprint.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Utilizing layer element 2000 for PointerIcon
- Using NEWT PointerIcon code
- Using MouseListener to update PointerIcon position
- FIXME: Check whether we shall intercept sendMouseEvent directly (lag)
Misc:
- Properly open, assign and close the BCM display handle
- Properly destroy the window (BCM element)
- Prepare for multiple windows, set position and size
|
|
|
|
| |
after EDT entry (deadlock)
|
|
|
|
| |
.. shameless inspired by KDE's Oxgen scheme .. (they are best)
|
|
|
|
| |
hashCodeComputed := true (always re-computes hash code - duh!)
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conversion Utilities (Allowing 'arbitrary' PointerIcon data input)
Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities,
utilized and further tested by this patch.
+++
- PointerIcon is a PixelRectangle
and hence holds the decoded data.
This allows on-the-fly conversion if required
as well as recreation w/o PNG re-decoding.
- Using array-backed PointerIcon data where possible,
allowing better performance when converting PixelFormat etc.
- NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...'
method to support agnostic PointerIcon creation.
- NEWT Display adds methods to allow users to avoid PixelFormat and
Buffer NIO type forced conversion:
- PixelFormat getNativePointerIconPixelFormat()
- boolean getNativePointerIconForceDirectNIO()
+++
PNGImage -> PNGPixelRect
Deleted: com.jogamp.opengl.util.texture.spi.PNGImage
Added: com.jogamp.opengl.util.PNGPixelRect
(We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO)
PNGPixelRect is a PixelRectangle
PNGPixelRect actually is implemented OpenGL agnostic,
however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj'
it cannot be moved up (yet).
PNGPixelRect now handles all PixelFormat for the target format
and also added support for grayscale+alpha (2 channels).
The latter is force-converted to RGB* - similar to paletted.
Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data.
Used by: TextureIO and NEWT
+++
- OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle
instead of a PNG resource.
- AWTMisc uses the PixelRectangle to produce the AWT Cursor
and converts it to the required format.
Hence same pixels are used for NEWT and AWT pointer/cursor icon.
- TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests'
iterate over 3 custom PointerIcon when pressed 'c'.
- JOGLNewtAppletBase uses the new custom PointerIcon
'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only).
-
|
|/
|
|
|
|
|
|
|
|
| |
Utilities (Allowing 'arbitrary' PointerIcon data input)
To allowing 'arbitrary' PointerIcon data input, i.e. via raw pixels
we need to define an agnostic PixelFormat and required conversion utilities.
The latter is not hw accelereated (toolkit agnostic), but this shall be expected
and satisfying for small amount of 'pixels'.
|
|
|
|
|
|
|
| |
OffscreenLayerSurface PointerIcon/Visibility tasks async on AWT-EDT
setCursor(..) and hideCursor(..) must happen on the AWT-EDT w/o blocking,
otherwise we may deadlock the NEWT-EDT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
delegation _always_ in common WindowImpl ; Workaround for Windows+Applet issue.
Perform OffscreenLayerSurface delegation _always_ in common WindowImpl
Instead of performing OffscreenLayerSurface task on OSX's WindowDriver implementation,
use generic implementation in WindowImpl for all platform exposing same behavior.
ReparentAction takes care of reset/setup of PointerIcon/Visibility states.
+++
This is also a workaround for Windows+Applet issue,
where the PointerIcon gets periodically overridden
by the AWT Component's icon.
|
|
|
|
|
|
|
| |
NewtCommon_throwNewRuntimeException(..) if given references are of invalid type
Missing NewtCommon_init(env) always lead to a crash when calling NewtCommon_throwNewRuntimeException(..)
due to uninitialized clazz instances!
|
|
|
|
| |
redirect stderr to file jogamp_stderr.log (Useful for Applets)
|
|
|
|
| |
SetCursor(..) if HTCLIENT && isChildWin && customCursor
|
|
|
|
|
|
|
|
| |
(NativeWindow GDI / NEWT )
.. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..).
- NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons
|
| |
|
|
|
|
|
|
|
| |
Reparenting CHILD -> TOP
Hiding the window via 'ShowWindow(.., SW_HIDE)' before reparenting and subsequent
style change incl. visibility renders the Window-Icon visible.
|
|
|
|
| |
i.e. 'jailed'
|
|
|
|
|
|
|
|
|
|
| |
OffscreenLayerSurface (OSX CALayer) w/ JAWTWindow Path
Add setCursor(..) and hideCursor() to OffscreenLayerSurface interface,
impl. in JAWTWindow w/ AWT.
This allows an OSX NEWT Window using CALayer (i.e. NewtCanvasAWT)
to have setPointerIcon(..) and setPointerVisible(..) functionality!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and Issues
- Refine Display.PointerIcon: Complete type allowing re-creation
- Add associated Display reference
- Add used IOUtil.ClassResources reference
- Add isValid()/validate() methods for recreation
- Refine API doc
- Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy()
- Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file)
- Creation/Destruction and setting of PointerIcon happens on EDT
- DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList
- WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required)
- Fix 'initial' window.setPointerIcon(..) before createNative(..),
tested w/ TestGearsES2NEWT
- OSX Native Code:
- Move mouse and pointer-state handling from NewtMacWindow -> NewtView class
to retain states (pointer handle, pointer visibility, etc) when reparenting.
Reparenting will move an exisiting NewtView into a new NewtMacWindow.
- Enable all mouse move events:
- NewtView::mouseEnter [nsWin makeFirstResponder: nsView];
- NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; }
- NewtView::mouseMoved issued [myCurser set] if required, fixing
OSX issue not updating NSCursor properly.
- MacWindow:
- Test NewtMacWindow, NewtView and NSCursor handles before usage
- Fix DBG_PRINT(..) warnings
|
|
|
|
| |
which is always 4 (RGBA/BGRA
|
|
|
|
| |
which is always 4 (RGBA/BGRA)
|
| |
|
| |
|
| |
|