aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
Commit message (Collapse)AuthorAgeFilesLines
* Avoid NPE (pairs with 6188d6a385056adade49fcb6d8247f94f96d402e)Sven Gothel2011-02-251-4/+5
|
* Avoid NPE, incr. test poll, ..Sven Gothel2011-02-251-8/+8
|
* NativeWindow NativeSurface lock/unlock Surface cleanup ; NEWT WindowImpl ↵Sven Gothel2011-02-222-19/+32
| | | | | | | | | 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-226-203/+276
| | | | | | | | | | 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
* NativeWindow ProxySurface Abstraction and lock/unlock Surface cleanupSven Gothel2011-02-222-23/+30
| | | | | | | | | | | | | - ProxySurface -> abstract javax.media.nativewindow.ProxySurface, implemented by jogamp.nativewindow.WrappedSurface, just wrapping surface handle jogamp.nativewindow.windows.GDISurface, using HWND and get/release HDC on lock/unlock - Unifying NativeSurface's lockSurface/unlockSurface implementations - NEWT's WindowImpl - NativeWindow's ProxySurface, WrappedWindow, GDIWindow and JAWTWindow - wingdi/GDI: Add 'WindowFromDC' and 'GetClientRect' to GDI
* Fix: Java 1.5 warningsSven Gothel2011-02-091-1/+1
|
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-0941-101/+101
| | | | | | | | | | | | | | | 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-0/+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
* NEWT: Cleanup reparent (window resize/display) ; AWT Focus Tests: Bring back ↵Sven Gothel2010-11-151-12/+15
| | | | AWT wait period.
* NativeWindow AbstractGraphicsDevice: Add 'unitID' attribute and getUniqueID()Sven Gothel2010-11-158-8/+8
| | | | | | | | | | Preparation to support multiple devices on one machine, hence adding the unitID a unique ID/index of the associated GPU, or GPU affinity. Adding getUniqueID() to return a cached semantic unique string id for the device. This was removed from the temp. impl in JOGL's GLContext, added unitID. All other changes just adapt to the above.
* NEWT: Make setVisible/reparentWindow return status more reliable ↵Sven Gothel2010-11-152-15/+36
| | | | | | | (visibility, displayed) Ensure that at least one frame has been rendered after returning from the functions. This removes the hack of polling a while for a rendered frame.
* NEWT: Add optional eager native initialization ; Proper exception handlingSven Gothel2010-11-145-26/+60
| | | | | | | | | | NEWT: Add optional eager native initialization of Display and Screen to overcome a possible chicken/egg situation. This is useful to be able to request the AbstractGraphicsDevice, via getGraphicsDevice(). Otherwise the abstract device won't be available before the dependent components (Screen and Window) are realized. Throw NativeWindowException in case native creation failed.
* GlueGen JogampVersion Adaption (getInfo -> toStringBuffer/toString)Sven Gothel2010-11-142-6/+6
|
* Adapt to GlueGen Version changes; Adding NativeWindowVersion, JoglVersion ↵Sven Gothel2010-11-122-3/+69
| | | | | | | | | and NewtVersion. Adapt to GlueGen Version changes: b735755815312b5fe2c003642de60711be1cd645 .. 556c7e70d3d57aa99b5787b1e4d8a7b1c299ed3f Show information of all subcomponenet.