| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Display/Screen:
- Removed Display reusage by unique TLS key: type + name,
instead use user-responsibility or Destroy-When-Unused (usage reference count).
- Removed X11 Display TLS pool usage
- Display creation means i, incl the later native one (X11).
- Added reference counting as follows:
- Display's refCount: number it is referenced by Screen:
display.addReference()/display.removeReference()
- Screen's refCount: number it is referenced by Window:
screen.addReference()/screen.removeReference()
- Lazy creation using refcount 0 -> 1
All resources are created when they are needed.
This also removes redundant native Display/Screen objects,
ie in case of [AWT] reparenting.
- Default lifecycle is user-responsibility, ie no Destroy-When-Unused, where
Window may be destroyed unrecoverable, which removes the Screen reference only.
- If using optional Destroy-When-Unused a
Window may be destroyed unrecoverable, which removes the Screen reference:
Screen.removeReference();
IF Screen.refCount == 0 THEN
Screen.destroy();
Display.removeReference();
IF Display.refCount == 0 THEN
Display.destroy();
- Use Destroy-When-Unused lifecycle for all automatic created Display/Screen
instances (GLWindow, NewtCanvasAWT,..)
- Display/Screen destroy/create cycles valid,
ie you can reuse destroyed Display/Screen's
- EDTUtil:
- Created right away.
- Started always via invoke, if not running.
- DefaultEDTUtil:
- Simplified locking a bit locking on:
- edtLock for start/stop
- edtTasks for tasks queue
- invoke-wait doubles check shouldStop
- invoke-wait 'waiting' outside of edtLock
+++
NEWT: Cleanup
- Window.destroy/invalidate: deep -> unrecoverable
- Window.isNativeWindowValid() -> Window.isNativeValid()
to unify with Display/Screen
- Window.isDestroyed() -> Window.isValid()
to unify and simplify logic.
Returns false if destroy(true) has been called.
- NewtFactory.wrapDisplay(.. handle) -> NewtFactory.createDisplay(.. handle),
since it actually creates a compatible display.
+++
NativeWindow X11Util: Added non TLS createDisplay()/closeDisplay()
+++
TODO:
- Stabilize (many tests fail)
- OSX
|
| |
|
| |
|
|
|
|
| |
extension related details of the GL_VERSION_x_y blocks into their extension block
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Update header:
- GL/glext.h to khronos 2010-08-03
- GL3/gl3.h to khronos 2010-08-03
- Move platform code to
GL/glplatform.h
GL3/glplatform.h
- Unify 64bit typedefs: gl-64bit-types.h
- Move GL 3.[123] and 4.[01] complete subsumed extension
enums and functions into their extension spec and just reference them.
This ensures proper extension availability
via lower OpenGL profiles, hence a proper GL2GL3 interface.
- GL3/GL4 cleanup:
- make-glextension-depignore.sh:
determine required GL version for extensions
for proper positioning, ie GL2GL3 or GL3 or GL4
via gluegen IgnoreExtension commands.
- use ARB_ES2_compatibility for common GL2ES2 methods,
if available
- consolidated gl2-gl4 subsumed extension to gl-common.cfg
- Missing GL3/GL4 Functions:
glMultiDrawElementsBaseVertex
glDebugMessageCallbackARB
glDebugMessageCallbackAMD
- TODO (new feature integration):
- ARB_ES2_compatibility / ARB_get_program_binary for com/jogamp/opengl/util/glsl, ie
- store binaries com/jogamp/opengl/util/glsl/sdk/CompileShader*
- query supported binary formats (enums ?)
- optional prio binaries
- ARB_ES2_compatibility, if available GLES2/GL2ES12 would be available
- ARB_separate_shader_objects for com/jogamp/opengl/util/glsl, ie
- swizzle vertex/fragment shader in programs
- ..
|
|
|
|
| |
product.build.number
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
reparenting
Set _NET_WM_WINDOW_TYPE to specify decoration etc.
On KDE4 having compositing enabled the reparent window is sometimes
made invisible (UnmapWindow happened). FIXME.
|
|\ \
| |/
|/| |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
quite a while ago)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
native repaint; Fix reparent/fullscreen
New: NEWT Native Repaint
=========================
Support for native repaint, which shall call display() in case no animator is running.
GLAutoDrawable invoke(GLRunnable) impl. handles case if invoked on animator thread,
or no animator thread is running (issueing a display() call).
The impl resides in GLDrawableHelper.
The Animator un-/registers itself at the GLAutoDrawable via setAnimator.
New: NEWT AWT/NEWT Parenting Focus Handling
============================================
Introducing Window.FocusRunnable, to be registered at the NEWT Window,
which will be executed before the native focus claim.
Window.FocusRunnable's run method returns a boolean,
which determines whether the native implementation shall proceed claiming the native focus.
This API focus hook is necessary to allow an optional underlying windowing toolkit,
ie AWT (see usage NewtCanvasAWT), to make the focus traversal transparent.
Fix: GLEventListener / GLDrawableHelper
========================================
GLEventListener's init() and glViewport()/reshape() method must be called before the 1st display()
and after a dispose() call. It could miss the 1st display() call if added
after the setVisible(true) call - due to the native repainting.
The impl resides in GLDrawableHelper.
Fix: Misc NEWT
==============
Window reparent issues a resize() and display() call, if it is visible.
native Window uses direct send.*Event for input events (again),
instead of enqueueing it for performance.
Window impl all status change native event Java callbacks, instead of having
duplicated code in all implementations.
Fullscreen, reposition at zero.
Reparent/Fullscreen repaint if visible.
Native reparent/fullscreen, fix glitches on Windows (visibility while reparenting)
|
|\| |
|
| |
| |
| |
| |
| | |
- attempt to solve some issues in module systems
- all classes are now loaded with the same classloader which loads GLProfile
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
native repaint; NewtCanvasAWT focus fix
Support for native repaint, which shall call display() in case no animator is running.
GLAutoDrawable invoke(GLRunnable) impl. handles case if invoked on animator thread,
or no animator thread is running (issueing a display() call).
The impl resides in GLDrawableHelper.
GLEventListener's init() and glViewport()/reshape() method must be called before the 1st display()
and after a dispose() call. It could miss the 1st display() call if added
after the setVisible(true) call - due to the native repainting.
The impl resides in GLDrawableHelper.
The Animator un-/registers itself at the GLAutoDrawable via setAnimator.
NEWT Window reparent always issues a resize() and display() call.
NEWT native Window uses direct send.*Event for input events (again),
instead of enqueueing it for performance.
NEWT Window implements all status change and Java native event callbacks,
instead of having duplicated code in all implementations.
NewtCanvasAWT if the Newt window is focused, the AWT/Swing component[s] will loose the focus.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add: 'public void addGLEventListener(int index, GLEventListener listener)'
Fixes previous GLWindow addition, ie public in interface and common impl. behavior.
- Add: 'public void invoke(boolean wait, GLRunnable glRunnable)'
- Change: 'public void display()' semantics, in regards to the GLRunnable queue
New: GLRunnable, invoke() at GLAutoDrawable
Allows injection of GL commands from other threads, executed after the
GLEventListener's display() notifyier by the GLAutoDrawable.
NEWT:
- Fix EDTUTil.invokeAndWait() and Display.enqueueAndWait() impl.,
where we only wait for the single action/event to be processed now.
JUnit: NEWT Parenting
- Added test cases for Swing (JFrame, JPanel and COntainer) with NewtCanvasAWT
- Added thread calling 'invoke(true, GLRunnable)'
- start Animator ASAP
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc ..
TODO: Compile and test on MacOSX ..
Fix:
=====
Multithreading/Locking:
See jogl/doc/Implementation/MultiThreading.txt
- Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, ..
and NEWT: Window/Display
- No more use of JAWT global lock necessary, removed.
- No need for X11 Display lock, on the contrary,
this made the NV driver hang.
- Use common window/surface lock
- All NativeWindow surfaceLock's are recursive now
glMapBuffer: If size is 0, don't do cont with the native call.
glMapBufferRange: Fix capacity.
glNamedBufferDataEXT: Track the size.
glMapNamedBufferEXT: Manual impl. - use the tracked size
glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of
ignoring and implement a renamed version (*Copied), we just use ManualImplementation
for the proper copy-result code.
DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes
in the determing loadGLJNILibrary() method, which is called by super().
Otherwise static init will overwrite them after the super() call.
X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()),
since this caused a freeze/SEGV sometimes.
Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage.
- Native: if not visible, don't focus, etc
- NewtCanvasAWT: Use the container size to start with
- Run the command on the EDT
Using GlueGen's new DynamicLibraryBundle utility:
- X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo.
- X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo
- Remove all path from lib names.
- GL order: libGL.so.1, libGL.so, GL
- shallLinkGlobal: true -> to server some 'old' DRI systems
-> http://dri.sourceforge.net/doc/DRIuserguide.html
- shallLookupGlobal: false
- Try both : glXGetProcAddressARB and glXGetProcAddress
- Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName)
Found the issue with LIBGL_DRIVERS_PATH, ie if not set
no valid GL instance can be found (ie ATI fglrx/DRI).
This may happen if using a differen user than the desktop user
for whom the env var is set within some /etc/X11/Xsession.d/ script.
Enhancements:
=============
GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking.
GLBufferStateTracker: Use IntIntHashMap.
GLStateTracker: Use IntIntHashMap.
GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list),
remove redundant code.
FIXME:
MacOSXCGLDynamicLookupHelper:
- Not tested
- Not using NSImage lookup anymore as recommended by OSX API Doc,
so dlsym is used always (to be tested)
WindowsWGLDynamicLookupHelper:
- Not tested
GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime,
no compile time dependencies to GL anymore, nor a need to specify CgGL.
Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32
while using static binding to GDI32
NEWT events generated by native code are enqueued and not send directly.
This should ease locking mechanisms .. if any are necessary.
NEWT: More platform specific code moved to *Impl method,
simplifying the generic code of the superclass and impl protocol.
Cleanup:
=========
Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers
Removed all InternalBufferUtil's from repository
Removed GLContextImpl notion of 'optimized' surface locking,
where the surface gets unlocked during makeCurrent/release.
This just makes no sense and would impact multithreading in a horrible way.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GLAutoDrawable: dispose() calls only with created context.
- Using the EGL approach of DynamicLookupHelper,
now generalized in abstract GLDynamicLookupHelper,
DesktopGLDynamicLookupHelper and EGLGLDynamicLookupHelper.
The implementation of these are self contained.
- Sharing common code.
- Unifying implementation and binding loading,
as well as the function lookup within the impl libs.
- Removed DRIHack, since its no more required
due to the new DesktopGLDynamicLookupHelper.
- Removed compile time link to GL and GLU libs
- Removed redundant library OS functions from X11/WGL
bindings, GlueGen's common code is being used now.
- GLAutoDrawable: dispose() calls only with created context.
This cleans up stack traces in case of eventual bugs,
where context creation is not successful.
|
| |
| |
| |
| | |
Add Platform info in test
|
|\| |
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Excluding MacOSX build from CDC build
- If MainThread is not running, use AWT's EDT thread
- Execute most MacWindow tasks directly.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Using Display.getEDTUtil() and Display.runCreateAndDestroyOnEDT()
to determine the NEWT EDT behavior, which may be specialized by the implementation.
- AWTWrapper and Newt/AWT Parenting deadlock fix.
- Misc fixes in test cases
|
|/
|
|
| |
inner classes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Misc.
Due to incapabilities of the previous AWT/NEWT reparenting
the implementation and spec had to be changed to support this feature.
See the first 2 comments below.
- Tested on GNU/Linux (OK), Windows (a few bugs left)
-
TODO:
- Clarify the size/layout issue, ie who is responsible etc
In the test, incl AWT/NEWT, we set the size on the GLWindow
and ie pack the AWT Frame.
- Fix remaining [Windows] bugs ..
- Fix/Implement MacOSX port ..
Fix AWT/NEWT reparenting:
===========================
- Now NewtFactory's createWindow() method for parenting handles NativeWindow only
and is no more responsible for creating a child window upon an AWT Component.
See class com.jogamp.newt.awt.NewtCanvasAWT for NEWT/AWT parenting.
- New com.jogamp.newt.awt.NewtCanvasAWT, responsible for handling
AWT's reparent events via addNotify/removeNotify.
Reparenting is implemented via the new NEWT Window's reparentWindow() method.
Also sets the background erase to false, if supported.
- Fix zero size semantics in Window (setSize/setVisible)
Since a zero size window is not supported by many compoenent (Windowing system, OpenGL, ..)
we use the visibility methodology to not show a 0x0 window. See Javadoc.
AWT components may start with zero size.
- New NEWT Window: reparentWindow(NativeWindow newParent, Screen newScreen)
Allowing to change the parent of a window. Similar with the fullscreen toggle,
but without size/position change.
Native reparenting allows to keep alive the native
window while changing the container, hence it is preferred to a destroy/create cycle.
To benefit from the native reparenting, a NEWT implementation has to implement
'protected boolean reparentWindowImpl(long newWindowHandle)'
and return true, otherwise reparenting will be 'emulated' via
the expensive destroy/create cycle.
- NEWT's Window references all of it's children, if any
- NEWT's Window propagates setVisible/destroy actions to it's children.
- Fix NEWT's destroy() semantics.
A call of destroy() or destroy(false) shall only result in the destruction of the
native window (handle) nothing more. A subsequent setVisible(true) shall allow
the complete recreation of the Window into a usable state.
A call of destroy(true) destroys all resources the Window holds,
may include Screen/Display and OpenGL resources in case of GLWindow.
This is necessary to allow proper reparenting, where a native window may become
destroyed, but should be recreated via setVisible(true) later on.
- Fix NEWT set[Size|Position|Fullscreen|Visible] synchronization.
Use a recursive lock instead of the Window instance, otherwise arbitrary Window access
via AWT's EDT, NEWT's EDT or other threads can block.
Also removed a use pattern like:
key.lock()
try {
EDT.invoke(action());
} finally {
key.unlock();
}
Where action() itself uses the same lock object (here key), the result is a deadlock.
NativeWindow Changes:
======================
- We can use XInitThreads() now (concurrent threading support)
in combination with AWT.
Might have been some async in our NEWT locking in regards to AWT (sync()),
and the X11 Display changes made in c787f50d77e2491eb0d8201d534a6fa4885a929e.
- NativeWindow's window handle is _not_ transient like surface handle,
fixed documentation.
JOGL Changes:
=============
- New 'isRealized()' method in GLDrawable.
-
Misc Fixes
============
- Fix NEWT set[Size|Position|Fullscreen|Visible] duplicate code
Due to pure abstract signatures, the set[Size|Position|Fullscreen|Visible]
implementations of X11, OSX, .. contained duplicate code and state handling (size, pos, ..).
These are now decoupled, ie generic set[Size|Position|Fullscreen|Visible] implementations
calling simple set[Size|Position|Fullscreen|Visible]Impl implementations.
- Fix NEWT: Renamed setAutoDrawableClient(boolean) to setHandleDestroyNotify(boolean)
The semantic of
setAutoDrawableClient(boolean) defaults to false
was too complicated and specific, hence changed to
setHandleDestroyNotify(boolean) defaults to true
since its more clear and the name refers the window itself..
- Fix NEWT: Removed GLWindow's unused global window list
- Fix NEWT: Remove Window's unused event mask
- Rename com.jogamp.newt.impl.awt.AWTNewtFactory -> com.jogamp.newt.awt.NewtFactoryAWT
|
|
|
|
|
|
|
|
| |
- Restructure: JAWT gluegen, use common jawt-common.cfg
- Fix: Use proper capacity for GetDrawingSurface and GetDrawingSurfaceInfo
- Fix: JAWTWindow maintains AWT bounds
- Fix: JAWTWindow locking/unlocking decoupled with abstract implementation,
which allows clear code and simpler unlock code.
|