aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
Commit message (Collapse)AuthorAgeFilesLines
* Adapt to gluegen Properties/Security commits ↵Sven Gothel2012-03-131-2/+1
| | | | f4ac27e177f6deb444280d3b375e7d343e38bd080 and eedb4b530fb83fc59a26962bcf7847a1404092a0
* GLWindow/GLDrawableHelper: Adding experimental notion of skipping GL context ↵Sven Gothel2011-10-081-1/+1
| | | | | | | | | | | | | release for a specific thread - marked deprecated - used to perf measure situation on omap3, ie figuring out where the low perf. in GearsES2 comes from, our core JOGL code or the GL usage. Turns out it's the GL usage itself, ie the shader - good. - calls are commented out in the demos
* Add unified support for GL_ARB_debug_output and GL_AMD_debug_output.Sven Gothel2011-04-241-5/+18
| | | | | | | | | | | | | | | | | | | | | | If GL_ARB_debug_output is not available, but GL_AMD_debug_output exist, fallback to the latter, offering generic aliased methods translating the delta (AMD category <-> ARB source/type). Generic aliased methods reside in GLContext* Enable/Disable via GLContext and GLAutoDrawable. To enable the GLDebugOutput feature GLContext.enableGLDebugMessage(true) or GLContext.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be called _before_ context creation via GLContext.makeCurrent()! In case GLAutoDrawable is being used, GLAutoDrawable.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be issued before context creation via GLContext.makeCurrent()!. After context creation, the GLDebugOutput feature may be enabled or disabled at any time using this method. Verify both unit tests for usability.
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-091-1/+1
| | | | | | | | | | | | | | | jogamp.<module> (2/2) - edit files - com.jogamp.opengl.impl -> jogamp.opengl - com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc - com.jogamp.nativewindow.impl -> jogamp.nativewindow - com.jogamp.newt.impl -> jogamp.newt This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* JOGL/NEWT: Animator fixesSven Gothel2010-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider use cases with many drawables and no drawables at start, this had to be reflected all over this patch set, implementation, usage and test cases. - GLAnimatorControl - refine API doc / states - add 'void remove(GLAutoDrawable drawable);' - Animator*: - using RecursiveLock 'stateSync' for all actions out of the big synchronized (animator) block: - get status methods (thread, isPaused, ..), hence no more synchronized - display drawables change, utilizing synced ArrayList swap This removes the need for volatiles usage shouldPause/shouldStop within the display method. - added blocking wait for state change for add(GLAutoDrawable)/remove(GLAutoDrawable) method - remove flawed double checked locking in anim thread (pause/idle condition) - thread is now a daemon thread, hence it won't hinder the JVM from shutdown - - Animator use change: - Always resume after pause, except in case of final destroy -> NEWT invalidate / GLCanvas, this considers use cases with many drawables and no drawables at start. - GLDrawableHelper: Don't pause at implicit dispose()
* NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit testSven Gothel2010-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | NativeWindow/NativeSurface Refactoring - Using NativeSurface interface - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point) - NativeWindow add: getParent() - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must. - NullWindow -> ProxySurface impl NativeSurface - JOGL: Uses NativeSurface only. - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface() Added mouseClick NEWT/AWT unit test JOGL: - GLAnimatorControl add: resetCounter() - NEWT: - GLWindow counters: return GLWindow counters always - WindowImpl - requestFocus() wait until done - reparent: readded requestFocusImpl(true), native impl skips java focusAction if reparented - X11Window: Add XRaiseWindow() in requestFocus()
* NEWT: Animator API Change - Changed Lifecycle of Display/Screen (part 4)Sven Gothel2010-09-231-45/+31
| | | | | | | | | | | | | | | | | | | | | Change GLAutoDrawable interface: setAnimator(Thread) -> setAnimator(GLAnimatorControl) to minimize the setAnimator(..) calls and to allow fine grained control over the animation, ie in case of reparenting where the animation shall pause while changing the window(s). Introducing GLAnimatorControl interface: - abstract class AnimatorBase implements GLAnimatorControl - class Animator extends AnimatorBase - class FPSAnimator extends AnimatorBase This also changes FPSAnimator, since it is no more derived from Animator, use it's superclass or superinterface instead. +++ - Fix GLJPanel.paintComponent(): Don't issue reshape/display in case an external animator thread is animating. - Fix: Documentation [API]
* GLAutoDrawable: setAnimator/getAnimator/invoke/display changes; NEWT: Adding ↵Sven Gothel2010-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* GLAutoDrawable: setAnimator/getAnimator/invoke/display changes; NEWT: Adding ↵Sven Gothel2010-06-261-28/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* JOGL.GLAutoDrawable:Sven Gothel2010-06-161-10/+44
| | | | | | | | | | | | | | | | | | | | | | - 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
* refactoring: renamed com.sun.opengl -> com.jogamp.opengl.Michael Bien2010-03-271-1/+1
|
* GL3 Related:Sven Gothel2009-08-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix glGetStringi's return type to String - Fix ExtensionAvailabilityCache: GL3's glGetStringi for GL_EXTENSIONS Ensure to add GL_VERSION_2_0 in case version >= 3.0 Ensure to not exceed version 3.0 for non GL3.1 context. In case of GL 3.1, do not include GL_VERSIONS below 3.0, since this is a forward compatible context. - Add Prologue to glGetString, where the ExtensionCache is being used for GL_EXTENSIONS - if already initialized. This feature adds backward compatibility for GL3 context on GL_EXTENSION. +++ General: Add GLPipelineFactory, a convenient pipeline factory for Debug/Trace and custom ones .. Change 'void setGL(GL)' to 'GL setGL(GL)', and let it return the successful set GL, or null.
* Fix property query. Thx to Ken pointing this out.Sven Gothel2009-07-031-1/+2
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2018 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fix property handling ; Adding jnlp. aliasing for propertiesSven Gothel2009-07-031-1/+2
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@2016 232f8b59-042b-4e1e-8c03-345bb8c30851
* Copied JOGL_2_SANDBOX r1957 on to trunk; JOGL_2_SANDBOX branch is now closedKenneth Russel2009-06-151-0/+211
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1959 232f8b59-042b-4e1e-8c03-345bb8c30851