aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
Commit message (Collapse)AuthorAgeFilesLines
* Newt Window: Remove 'invalidate()' method, only 'destroy()' is required (and ↵Sven Gothel2011-04-262-36/+16
| | | | | | | makes sense) - WindowImpl/GLWindow: Cleanup destroy code .. - Tests: sync / remove FPS stderr print
* NEWT Event Types: Use final modifier if possibleSven Gothel2011-04-245-8/+8
|
* Add unified support for GL_ARB_debug_output and GL_AMD_debug_output.Sven Gothel2011-04-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | 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.
* New FPSCounter, impl. by GLWindow and GLAnimatorControl (fps perf related ↵Sven Gothel2011-04-231-60/+38
| | | | | | | | | | | API change) - Don't fetch System.currentTimeMillis() by default and for every frame (performance) - Default behavior is FPSCounter switched off - Enable by frame interval, ie measure each 60 frames. - FPSCounterImpl is default impl. used by impl. FPSCounter class (reduce code/redundancy) - Might be promoted to GLAutoDrawable ?!
* NEWT GLWindow: Remove context current check for swapBuffer() callSven Gothel2011-04-221-7/+1
| | | | | | | The spec doesn't require a current context for a swap buffer call, however, if required .. as user shall encapsulate it by himself, or use the GLEventListener model. Motivation: Reduce TLS GLContext.getCurrent() calls.
* simple cleanup/warningsSven Gothel2011-04-221-1/+0
|
* Fix TAB: Replace all TAB with 4 spacesSven Gothel2011-04-081-1/+1
|
* Cleanup (private access for inner classes)Sven Gothel2011-02-281-8/+8
| | | | | | | | | | Partially revert commit 5681c25cfd4c7abce7d653910c9aa7a4e989057e - revert all window feature (visible, fullscreen, ..) runOnEDT calls to wait:=true, it turns out we loose stability and predictable behavior otherwise. - a user must ensure no calling these modifier methods from a locked window state, as documented (and changed) in commit 481285c3d19d0a4c019cffc72b7a8b58296b748e
* Code cleanup: override, imports, StringBuilder, ..Sven Gothel2011-02-262-8/+19
|
* Clean/Fix: Threading CodeSven Gothel2011-02-262-21/+18
| | | | | | - Remove unsafe double checked locking - Annotate safe double checked locking (volatile) - use 'static final' if possible
* NativeWindow NativeSurface lock/unlock Surface cleanup ; NEWT WindowImpl ↵Sven Gothel2011-02-221-4/+4
| | | | | | | | | lock/unlock Surface fix - Rename lock to surfaceLock to determine it's use - NEWT's WindowImpl windowLock usage is not sufficient for lock/unlock surface. Using distinguished surfaceLock for proper recursion count on lock/unlock surface.
* Cleanup NEWT MainThread, using new AWTEDTUtil impl. / Sync AWTCanvas with ↵Sven Gothel2011-02-221-48/+38
| | | | | | | | | | GLCanvas changes Cleanup NEWT MainThread, using new AWTEDTUtil impl. - Allow simple singleton AWTEDTUtil to be used for AWTDisplay and more .. Sync AWTCanvas with GLCanvas changes - Latest GLCanvas changes around addNotify() had to be synced
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-099-17/+17
| | | | | | | | | | | | | | | 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.
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-0832-7398/+0
| | | | | | | | | | | | | | | jogamp.<module> (1/2) - rename task - 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.
* GLCapabilities enhancements: Choosing, All-Available, Data Handling (X11, ↵Sven Gothel2011-01-312-19/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | WGL and EGL) - GLDrawableFactory exposes: public final List/*GLCapabilitiesImmutable*/ getAvailableCapabilities(AbstractGraphicsDevice device) - GLCapabilities platform specialization containing native ids (XVisual/FBConfig, PFD, EGLConfig, ..) - GLCapabilities setPbuffer(true) disables onscreen - Capabilities setOnscreen(true) disables pbuffer - Capabilities implements Comparable - *Capabilities: enhanced 'toString(..)' - CapabilitiesChooser.chooseCapabilities: 'CapabilitiesImmutable[] available' -> 'List /*<CapabilitiesImmutable>*/ available' - VersionApplet, GLCanvas.main, GLWindow.main, GLProfile/debug: dumps all available GLCaps - WGLGLCapabilities: proper non-displayeble (pbuffer) pfdid handling TODO: ES/EGL test with emulation
* Fix: GLX exception message / sorted importsSven Gothel2011-01-311-2/+3
|
* NEWT: Add WindowListener.windowDestroyed() ; Remove WindowImpl.windowDestroyed()Sven Gothel2010-12-239-25/+26
| | | | | | | | | | | | | Add WindowListener.windowDestroyed() To expose a proper window lifecycle, ie destroy-notify and destroyed, this notification is added. This will be used at least in unit tests, where we verify destruction. Remove WindowImpl.windowDestroyed(): This native hook (planned to be called by native destroy notification) is unreliable or not supported for all platforms. NEWT relies on the pre destroy native hooks and handles the final destroy notification itself.
* JOGL/NEWT: Introduce WindowClosingProtocol (solves Bug/Request 444)Sven Gothel2010-12-194-40/+110
| | | | | | | | | | | | | | | | | Similar to JFrame's closing behavior, the following components window closing follow the new WindowClosingProtocol: - GLCanvas - GLJPanel - NEWT Window, GLWindow - NEWT NewtCanvasAWT The implementation obeys either 1) the user value set by this interface, 2) an underlying toolkit set user value (JFrame, ..) 3) or it's default, eg. {@link #DO_NOTHING_ON_CLOSE DO_NOTHING_ON_CLOSE} within an AWT environment. If none of the above determines the operation, this protocol default behavior {@link #DISPOSE_ON_CLOSE DISPOSE_ON_CLOSE} shall be used.
* Version Applet as JavaWSSven Gothel2010-12-181-7/+64
|
* Version Applet: set GLCanvas size, otherwise it won't realize GL drawableSven Gothel2010-12-161-0/+1
|
* Add Version AppletSven Gothel2010-12-151-0/+88
|
* NativeWindow: Move RegisteredClass to private impl packageSven Gothel2010-12-122-3/+4
|
* Windows RegisterClass: Use new RegisteredClassFactory (window class), Misc.Sven Gothel2010-12-123-43/+29
| | | | | | | | | | | | | | | | | This solves the issue when an applet is started/stop and started again, or another applet runs in the same JVM. Also soves the issue for multiple JVMs. RegisteredClassFactory can be instanced to manage one shared window class, currently in use for GDI's dummy window and NEWT. A class base name and a window proc handle must be passed in the factory cstr. Before registering, the class is tested if already exists, eg another applet in the same JVM. If registration fails, the class name will iterate until successful or MAX_INT reached, eg if multiple JVMs are running. Added NativeWindow Common Native Code.
* NEWT: Minor cleanup ; Debug setVisible message in issuing threadSven Gothel2010-12-101-6/+8
|
* NEWT/Windows: Use GDI GetDC/ReleaseDCSven Gothel2010-12-091-5/+3
|
* Fix NEWT GLWindow: Adding missing shared GLContext setter (with unit test)Sven Gothel2010-12-031-1/+14
|
* Fix NEWT WindowImpl: setTitleImpl() at native construction.Sven Gothel2010-12-031-0/+1
| | | | This tiny fix finally enables the window title setting before setVisible(true)
* Cleanup GLDrawableFactory API and platform ImplementationsSven Gothel2010-12-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | - Finish API change using the AbstractGraphicsDevice, which denotes the target device for the desired NativeSurface / GLDrawable. The AbstractGraphicsDevice argument may be null to reflect the platform's default device. Clarified API documentation. This move is necessary to make the API coherent. - createOffscreenDrawable(..) may create a Pbuffer drawable if caps and supported. This unifies the functionality with createGLDrawable(..). Further more, a Pbuffer drawable is an offscreen as well. - added createOffscreenSurface(..) following the same behavior as createOffscreenDrawable(..), this is a convenient native offscreen surface factory entry. - removed createGLPbufferDrawable(..), use createOffscreenDrawable(..), since it is redundant! Implementation Details: - EGLDrawableFactory holds a shared native EGLGraphicsDevice, being used by the offscreen EGL drawable (no more multiple creation).
* NewtCanvasAWT: disableBackgroundErase() before (X11) and after (Windows) ↵Sven Gothel2010-11-281-0/+17
| | | | | | addNotify(). This change is in sync with 86c164950b0a0d351fc8af3884187b10201b6237
* NEWT WindowImpl: Null Check on childWindows (already destroyed)Sven Gothel2010-11-281-2/+2
|
* Reduce the use of xml brackets to reduce potential hudson/junit xml parser ↵Sven Gothel2010-11-251-1/+1
| | | | exceptions
* Refined VersionInfo usageSven Gothel2010-11-252-2/+6
|
* GLAnimatorControl pause()/resume() don't fail fast, return a boolean instead ↵Sven Gothel2010-11-221-7/+6
| | | | to simplify usage.
* JOGL/NEWT: Animator fixesSven Gothel2010-11-214-68/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()
* minor formattingSven Gothel2010-11-191-11/+6
|
* Resume GLAnimatorCtrl after destroying, so it back in state for either this ↵Sven Gothel2010-11-191-0/+3
| | | | resource at recreation or it's possible other drawables
* Avoid sendDestroy mechanism in favor of immediate destroy using ↵Steve Vaughan2010-11-191-2/+21
| | | | AnimatorControl to pause rendering.
* print platform info additional to the module info.Michael Bien2010-11-182-0/+3
|
* modifications due to changes in GlueGen's VersionUtil.getManifest().Michael Bien2010-11-181-3/+2
| | | | made references created in double checked locks volatile.
* NEWT: Adding CapabilitiesChooser setter and using it in createNativeImpl() ..Sven Gothel2010-11-1812-13/+40
|
* Finishing Immutable changes including GLCapabiltiesImmutable.Sven Gothel2010-11-1714-55/+54
|
* NEWT X11Display: ignore null Display handle at dispatchSven Gothel2010-11-171-3/+3
|
* Merge branch 'pulled'Sven Gothel2010-11-174-10/+19
|\
| * Implement CapabilitiesImmutable to indicate that getRequestedCapabilities() ↵Steve Vaughan2010-11-174-11/+19
| | | | | | | | and getChosenCapabilities() return immutable instances. Add cloneCapabilities() to create a mutable clone of an immutable set of capabilities.
* | cleanup importsSven Gothel2010-11-171-1/+0
| |
* | GLWindow becomes NEWTEventConsumer (missed that one) ; Adding test for ↵Sven Gothel2010-11-171-1/+8
| | | | | | | | | | | | | | NEWTEventConsumer and AWTTreeLock The unit test for NEWTEventConsumer and AWTTreeLock, tests previous commit 'JAWTWindow: Avoid AWTTreeLock' b0b1e3fb9c0f915cdf8d237c0f61a9d08ca83b01
* | JAWTWindow: Avoid AWTTreeLock, cleanup.Sven Gothel2010-11-171-1/+1
| | | | | | | | | | | | | | Use native implementation for getLocationOnScreen() if available. If unavailable call AWT's implementation only in case the AWT TreeLock is hold by this thread. Finalize methods ..
* | Moving NEWT X11Window GetRelativeLocation() native implementation to ↵Sven Gothel2010-11-171-1/+2
| | | | | | | | NativeWindow X11.
* | Move GDI GlueGen wrapping from JOGL -> NativeWindow (following X11). Moving ↵Sven Gothel2010-11-171-2/+2
|/ | | | NEWT WindowsWindow GetRelativeLocation() native implementation to GDI as well.
* NEWT Lifecycle remodel: Window destroy() !Sven Gothel2010-11-1611-274/+299
| | | | | | | | | | | | | | | | | | | | | | | NEWT's removed: Window: destoy(boolean unrecoverable) Display/Screen: get/set DestroyWhenUnused(boolean) We behave as follows: - Window.destroy() always decr Screen's reference counter, which issues destruction when reached zero. Then Screen does the same for Display .. - Window.destroy() keeps alive all references, hence it can be always recreated via setVisible(true). - Window.destroy() ensures Display's EDT is stopped if display is destroyed. - Window.invalidate() actually removes all Object reference, hence it cannot be recreated or used after it. This method exist to support a way to cleanup memory, GC. All test passed on Linux/X11 and Windows