aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
Commit message (Collapse)AuthorAgeFilesLines
* WindowsWGLContext: Proper var names, misc cleanupSven Gothel2010-12-181-17/+22
|
* convenient internal queries for sharedSven Gothel2010-12-181-0/+12
|
* GLCanvas: init drawable by paint/display makes the init sequence more equal ↵Sven Gothel2010-12-181-1/+3
| | | | for all launch flavors (applet/javaws/..)
* GLProfile: refine docSven Gothel2010-12-181-1/+2
|
* debug node: WindowsDummyWGLDrawableSven Gothel2010-12-171-0/+1
|
* SharedResourceRunner: Expose convenient 'getShared()' w/o creationSven Gothel2010-12-171-0/+5
|
* debug: print thread name only; simplify mapGLVersion(..) callSven Gothel2010-12-171-16/+12
|
* Fix WGL Bitmap Offscreen DrawableSven Gothel2010-12-164-20/+73
| | | | | | | | | | | In conjunction with the gluegen investigation (gluegen: fbdedff789077b5ffa07811590f771b6f9a4f3a7), on Windows the type LONG is always 32bit, hence we have to declare: typedef __int32 LONG; Besides, WGL_DRAW_TO_PBUFFER_ARB and WGL_DRAW_TO_BITMAP_ARB were missing in the WGL/ARB attribute query, and the latter was not set in caps -> attributes. Added fail safe exception for null chosen caps, if X11/WGL algo fails to determine.
* Cleanup (removed obsolete class / imports) ; Cg fixSven Gothel2010-12-134-79/+0
|
* Fix API doc: firstUIActionOnProcessSven Gothel2010-12-121-0/+4
|
* NativeWindow: Move RegisteredClass to private impl packageSven Gothel2010-12-121-1/+1
|
* GLJPanel/GLPbufferImpl: destroy pbuffer reentrance fix; disable device close ↵Sven Gothel2010-12-123-20/+25
| | | | (X11 error on nvidia); reenable GLJPanel test
* makeCurrent/release within closuresSven Gothel2010-12-121-3/+4
|
* GLProfile: initialize 1st, debug info later.Sven Gothel2010-12-121-2/+2
| | | | Debug shall not change the startup behavior
* Windows RegisterClass: Use new RegisteredClassFactory (window class), Misc.Sven Gothel2010-12-123-32/+72
| | | | | | | | | | | | | | | | | 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.
* Generalize SharedResourceRunner and use/impl it for WGL as well (besides X11).Sven Gothel2010-12-113-368/+521
| | | | | It seems necessary to use off thread shared resources (dummy window, drawable and context) to keep them alive in Java Webstart.
* GLCanvas: sync drawable access; flush awtConfig at remove;Sven Gothel2010-12-101-80/+101
|
* WGL/DummyWindow: Roll back GetDC/ReleaseDC via lock/unlock surface, ↵Sven Gothel2010-12-101-54/+26
| | | | redundant, since it's static DC
* Cleanup GLGraphicsConfiguration[Factory] implementations (X11/WGL)Sven Gothel2010-12-1016-441/+586
| | | | | | | | | | | | | | | | | - AWT/WGL: - Using sun.awt.Win32GraphicsConfig via reflection, if supported, else we may fail. - Preselection of PFD as follows: - 1st choice is to create our own AWT GraphicsConfig (GC) based on PFD/GLCaps, ignoring WGL_SUPPORT_GDI_ARB, PFD_SUPPORT_GDI - 2nd choice is to use AWT PFD pool of GC's - else we fail -> use NewtCanvasAWT instead (TODO: Other JDK/AWT implementations ?) - Set PFD will be performed at setRealized(..) - SharedContext (X11/WGL) is synchronized to allow multithreaded access, if required - Simplified and unified (X11/WGL) GraphicsConfigurationFactory - WGL 'external' drawables will be determined with given arguments right away
* JOGL: GLContextImpl's updateGLXProcAddressTable(..) only uses device as a ↵Sven Gothel2010-12-096-65/+80
| | | | | | | | | key for cached table, since the GLX/WGL/etc function entry pointers are GL profile agnostic. Hence createContextARBImpl(..) (WGL/GLX) does not need a sharedContext, but just can issue the inexpensive updateGLXProcAddressTable(..) call.
* DummyWindow: 64x64, WGL: Use lockSurface/unlockSurface block to gather / ↵Sven Gothel2010-12-092-11/+56
| | | | release HDC
* Fix: Typo unlock() -> lock() .. oopsSven Gothel2010-12-041-1/+1
|
* WGL DummyWindow: Use size 128x128 and set size in proxySven Gothel2010-12-041-1/+3
|
* X11 DummyWindow: Pass size and set size in proxySven Gothel2010-12-041-2/+3
|
* Windows WGL fixes updateGraphicsConfiguration(..) and DummyWGLDrawableSven Gothel2010-12-032-31/+30
| | | | | | | | WindowsWGLGraphicsConfiguration: If updateGraphicsConfigurationARB fails, continue with updateGraphicsConfigurationGDI WindowsDummyWGLDrawable: Utilize proper GraphicsConfiguration selection using updateGraphicsConfiguration()
* GLCanvas: Adding convenient constructor for GLCapabilties and Shared Context ↵Sven Gothel2010-12-031-1/+14
| | | | (with unit test)
* DEBUG: GLProfile: Dump GLInfo ; GLContext: SET mappedVersions.. no stack traceSven Gothel2010-12-032-18/+48
|
* GLPbufferImpl: Remove redundant AWT threading constraints ; Signal dispose ↵Sven Gothel2010-12-031-91/+38
| | | | to all GLEventListeners at destroy()
* Cleanup GLDrawableFactory API and platform ImplementationsSven Gothel2010-12-0315-239/+351
| | | | | | | | | | | | | | | | | | | | | | | - 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).
* JOGL AnimatorImpl: issue drawable.display() even if it's not realized yet, ↵Sven Gothel2010-11-292-9/+3
| | | | since the drawable may realize itself with the display() call. This situation appears with an AWT GLCanvas
* Animator: Run as non daemon like FPSAnimator. This seems to be the users ↵Sven Gothel2010-11-281-1/+6
| | | | desired behavior and is more compliant with other APIs
* JOGL: Proper handling of Read Drawable Support (if not supported), add query.Sven Gothel2010-11-2810-352/+363
| | | | | | | | | | | | | | | | | | | Read Drawable feature reflects the make context current API having a seperate read drawable next to the write drawable (default). glXMakeContextCurrent(write, read, ..) On X11 a ready drawable is only supported for GLX >= 1.3, on Windows only if extension WGL_ARB_make_current_read is available, on EGL it's always supported, on OSX not at all. API cleanup GLContext: changes: setGLDrawableRead(GLDrawable) -> setGLReadDrawable(GLDrawable) new: isGLReadDrawableAvailable() new: getGLExtensionsString(); Access qualifier cleanup. GLContextImpl: GLVersionNumber moved out.
* minor cleanupSven Gothel2010-11-282-10/+15
|
* GLCanvas: Fix disableBackgroundErase/X11, make drawable creation more ↵Sven Gothel2010-11-272-19/+78
| | | | | | | | | | | | | | | | robust, doc Java2D/AWT properties. On X11 disableBackgroundErase() must happen before native peer creation, this patch issues it before and after super.addNotify(). Make drawable creation more robust, ie only create a drawable in case the size is > 0x0 and do this check/create at display/paint in case size it not yet determined. Add documentation about Java2D/AWT properties impact on GLCanvas. Make JUnit tests on AWT/GLProfile's more robust, while adding frame validate() ensuring 1st paint will have a size, hence will create the drawable. This is necessary for eg. AMD GPU's and GL context > 3.
* Add GL_VENDOR to JoglVersion GL outputSven Gothel2010-11-261-0/+2
|
* WGL: Add GetLastError in case external context/drawable can't be retrievedSven Gothel2010-11-262-5/+5
|
* Reduce visibility -> package privateSven Gothel2010-11-269-115/+114
|
* Refined VersionInfo usageSven Gothel2010-11-252-7/+9
|
* JOGL/Windows/ATI r3xx: Bug #438: tolerate release context if GetLastError is ↵Sven Gothel2010-11-251-11/+18
| | | | SUCCESS
* NativeWindow/GDI: Adding ERROR_SUCCESS to make the code more clear.Sven Gothel2010-11-254-10/+13
|
* GLProfile/Debug: Dump Version info upfront, otherwise we won't see it with ↵Sven Gothel2010-11-251-6/+6
| | | | | | an <init> exception. Also adding current thread name.
* GLCanvas: Refine access modifiersSven Gothel2010-11-251-4/+4
|
* Relax GLAnimatorControl, ie remove fail fast for start()/stop(), return ↵Sven Gothel2010-11-253-16/+21
| | | | (boolean)success instead.
* Fix GLCanvas Recreation - Regression 96af6c9bf2d683115996Sven Gothel2010-11-251-32/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | 96af6c9bf2d683115996 moved the creation of the AWTGraphicsConfiguration, GLDrawable and GLContext to the GLCanvas constructor. This disabled recreation, removeNotify()/addNotify() after 1st addNotify(), since the drawable/context were already set to null. Smart recreation, ie not destroying the resources completly: 1 - drawable 2 - context 3 - AWTGraphicsConfiguration's Device (X11: Display) is not possible, since removeNotify() is the only destroy notification we have from AWT, which would leave the above resources open -> leak. This is especially true for (3), since the device is created 'on the fly'. In NEWT we use lazy creation/destroy and are able to keep the references alive. A remodelling of AbstractGraphicsConfiguration would be required, which indeed would be overkill. Simple solution is to move the creation block back to addNotify() but before 'super.addNotify()', since it needs our chosen AWTGraphicsConfiguration. Also flagging sendReshape in addNotify(). Added test case com.jogamp.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01.
* AnimatorBase: add()/remove() - decorate change of drawables with ↵Sven Gothel2010-11-231-30/+15
| | | | pause()/resume() so it becomes a non critical to multithreading, hence display() or state change needs to be synced
* Add GLJPanel test (works better in jogl-demos though, need to copy)Sven Gothel2010-11-231-6/+10
|
* X11/WGL: Unify GraphicsConfiguration Selection - Fixes WGL Bugs 397, 410, ↵Sven Gothel2010-11-237-359/+539
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 429, 428 and 405 Fixes bugs WGL pixelformat related bugs: http://jogamp.org/bugzilla/show_bug.cgi?id=397 http://jogamp.org/bugzilla/show_bug.cgi?id=410 http://jogamp.org/bugzilla/show_bug.cgi?id=429 http://jogamp.org/bugzilla/show_bug.cgi?id=428 http://jogamp.org/bugzilla/show_bug.cgi?id=405 Tested on Window7-x86 (amd/nvidia), WinXP-x32-VirtualBox. Solution: Cleaned up X11/GLX code to use it as a correct boilerplate for the new WGL selection, which now duplicates the same behavior. X11/GLX and WGL follow the common logic: - 1st try: - get GLCapabilities based on users GLCapabilities - setting recommendedIndex as preferred choice - 2nd try: - get all GLCapabilities available - no preferred recommendedIndex available If no recommendedIndex has been selected and no chooser has been passed, we use the DefaultGLCapabilitiesChooser. Choose the GLCapabilities if a chooser is given (or see above).
* JOGL: Fix CreateDummyWindow usage, no more sync needed, since the Window ↵Sven Gothel2010-11-221-5/+1
| | | | class HINSTANCE is acquired at static initialization
* JOGL/X11 Shutdown: Don't close pending Display connections since it may ↵Sven Gothel2010-11-221-1/+3
| | | | cause a SIGSEGV at JVM exit.
* GLAnimatorControl pause()/resume() don't fail fast, return a boolean instead ↵Sven Gothel2010-11-224-19/+22
| | | | to simplify usage.