aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/windows
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-281-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use (threading) Bug 527 describes the situation where wglShareLists() fails (throws exception) while the shared context is in use by another thread (some Animator). It was reported by Jerome Jouvie. The exception happens not everytime, but at least around 20% on manual tests I have performed on the Windows platform. The context in question are all JOGL's GL2, which natively where bound to an OpenGL 3.0 profile. The WGL_ARB_create_context spec says http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt: +++ Future versions of OpenGL may only support being added to a share group at context creation time. Specifying such a version of a context as either the <hglrc1> or <hglrc2> arguments to wglShareLists will fail. wglShareLists will return FALSE, and GetLastError will return ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB. +++ Hence the 1st patch was to remove 'wglShareLists()' usage in case we use the new WGL_ARB_create_context context creation method. Even though this is a desired change, and works in general, it didn't fix the issue. It seems that the shared context, which is passed @ new context creation, cannot be used while it is in use itself in another thread. This conclusion leads to the actual fix, ie. locking the shared context while creating the new context which shares it. Manual tests using this patch could not reproduce this issue (40 attempts). Test: TestSharedContextListNEWT2
* SharedResourceRunner: Use generics ; X11GLXDrawableFactory.SharedRunnable ↵Sven Gothel2011-11-261-7/+4
| | | | shutdown: don't attempt to close Display device.
* Nativewindow AWT Device/Screen: Cleanup construction [default, specific]; ↵Sven Gothel2011-11-251-1/+1
| | | | AWTDevice: Remove subtype
* GraphicsConfigurationFactory: Kick off 'registerFactory' via static method ↵Sven Gothel2011-11-233-8/+11
| | | | | | instead of constructor for clarity. - prepare for 'jogamp.nativewindow.x11.awt.X11AWTGraphicsConfigurationFactory'
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-238-10/+10
| | | | | | | | | | | AbstractGraphicsConfiguration, if delegation is used. This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration() to NativeSurface implementations and hence reduces complexity. NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration is controlled via get/set method avoiding flawed usage (read/write), since read access shall return the delegated AbstractGraphicsConfiguration, if used.
* WindowsWGLDrawableFactory createOffscreenDrawable() - Don't spin off ↵Sven Gothel2011-11-181-18/+17
| | | | creation on AWT thread (may deadlock)
* Nativewindow: Introduce API private MutableGraphicsConfigurationSven Gothel2011-11-121-4/+4
| | | | | MutableGraphicsConfiguration allows derivations to set the chosen capabilities, hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-093-3/+3
| | | | | | | | | | | | conflicts with setSize() This fixes the NEWT OffscreenWindow conflict w/ setSize() which represents the action of changing the window's size. SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size. JAWTWindow: Remove setSize() since it propagates the surface size upstream only. MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
* Cleanup offscreen/pbuffer drawables - minor editsSven Gothel2011-11-091-8/+4
|
* JOGL *Drawable swapBufferImpl() cleanup: Don't force swap-buffer off for ↵Sven Gothel2011-11-064-17/+6
| | | | offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
* JOGL/Offscreen-Drawable: Use setRealized(boolean) protocol for offscreen/pbufferSven Gothel2011-11-062-17/+26
| | | | This allows allowing updateHandle()/destroyHandle() to be called.
* Win32: Reuse Platform's OS VersionNumberSven Gothel2011-10-291-1/+1
|
* Minor edits / cleanup of GLContext*Sven Gothel2011-10-261-6/+2
|
* MacOSX: Always release ctx on main thread (offscreen was frozen as well); ↵Sven Gothel2011-10-132-6/+9
| | | | | | Cleanup Warnings and OSX ContextUpdater -
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* *GLContext: resetStates(); getPlatformExtensionsString(); GLX/WGL ↵Sven Gothel2011-09-091-17/+92
| | | | | | | | | | | | | | | | | | | | | | NV_swap_group support; setSwapInterval(); resetStates() - fixes a bug where X11GLXContext impl. resetState() !! - marked all with @Override tag - ensured super.resetStates() is called at end (oops) getPlatformExtensionsStringImpl()* - fixes a bug where X11GLXContext overrides GLContext cached GLX extension string query - marked 'final' in GLContext to avoid bugs - using abstract 'getPlatformExtensionsStringImpl()' called by ExtensionAvailabilityCache Add premiliry GLX/WGL NV_swap_group support - thought it might be a solution to sync swap of 2 windows - none of my drivers/platforms support it, event though extension is avail on Linux Promote setSwapInterval() (1 up) - bumped above API up to public GLContext - those extension should not spam the GL interfaces .. hmm
* Complete translucency support for Win32 - tested w/ NEWTSven Gothel2011-09-042-1/+29
| | | | | | | https://jogamp.org/bugzilla/show_bug.cgi?id=517 - Adding some Windows DWM entries to GDI (manual) for translucency support - Add translucency setting in WindowsWGLGraphicsConfiguration*
* Add GL Version 4.2 in GLContext Query - Add verification via ↵Sven Gothel2011-09-022-2/+2
| | | | | | | | | | glGetIntegerv(GL_MAJOR_VERSION|GL_MINOR_VERSION) Status (Using 4.2 beta driver): - Windows NV: Created and verified - Linux AMD: Creates even non existing ones, 4.2 (available) verification returns 0.0 - Linux NV: Created but verification fails, returns 0.0
* DynamicLibraryBundle*: Use generics for better spec - following gluegen ↵Sven Gothel2011-08-311-10/+9
| | | | commit cfb9e118e020707842e6b5136b07f5ab149540c1
* Cleanup: Java Generics Use and Removed Unused MethodsSven Gothel2011-08-243-15/+15
|
* Adapt to DynamicLibraryBundleInfo API change ; Remove non std EGL/ES libs ↵Sven Gothel2011-08-091-1/+1
| | | | (Android)
* GLProfile / eager init: Use relaxed query, if context was created while ↵Sven Gothel2011-08-071-0/+8
| | | | initialize shared
* GLProfile: Allow EGL besides desktop; Desktop factories restricted to ↵Sven Gothel2011-08-011-1/+1
| | | | | | | | | | desktop profiles Allow EGL besides desktop - Initialize EGL for default EGL device, even if desktop is available Desktop factories restricted to desktop profiles - Don't use native ES1/ES2 here ..
* GLContext Impl: Fix Platform 'GLX' ProcAddress Caching, allow multiple typesSven Gothel2011-08-011-3/+3
| | | | - Add platform type to key
* GLProfile usage getMinDesktop() -> getMinimum(); WGL/X11 GLCaps: make ↵Sven Gothel2011-07-312-3/+3
| | | | attributes final
* Fix SharedResource (SR) InitializationSven Gothel2011-07-071-12/+0
| | | | | | - Catch exceptions in SR thread avoiding deadlock in blocking caller thread - Catch NPE on SR queries to return null if appropriate
* Add unified support for GL_ARB_debug_output and GL_AMD_debug_output.Sven Gothel2011-04-241-7/+4
| | | | | | | | | | | | | | | | | | | | | | 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.
* GLContextImpl: GLContextLock -> RecursiveLockSven Gothel2011-04-231-9/+9
| | | | | | | | | RecursiveLock maintains a queue of waiting Threads, ensuring the longest waiting thread will be notified at unlock. Delete GLContextLock. Cleanup HashMap generics style.
* Fix TAB: Replace all TAB with 4 spacesSven Gothel2011-04-083-40/+40
|
* Fix Bug #480 (attempt) - ATI + WinXP: make context current for ARB PFD ↵Sven Gothel2011-03-215-57/+169
| | | | | | | | | queries/selection TODO: Validate if bug is actually relates to the 'old' ATI Windows driver for old GPU's like X300 etc and unrelated to the actual Windows version ! Also ensure that the no pixelformat is being set on external context/HDC.
* Refine getAvailableGLCapabilitiesImpl (XGL, WGL and EGL): Sort only if size > 1Sven Gothel2011-03-202-4/+2
|
* Refine WGL_PIXEL_TYPE_ARB and GLX_RENDER_TYPE:Sven Gothel2011-03-203-19/+29
| | | | | | | | | | | | | | | | | WGL_PIXEL_TYPE_ARB: Results -> GLCapabilities - WGL_TYPE_COLORINDEX_ARB not supported - Only WGL_TYPE_RGBA_FLOAT_ARB makes pbuffer float Query: - Only use WGL_FLOAT_COMPONENT_NV if supported - Remove multiple WGL_PIXEL_TYPE_ARB entry GLX_RENDER_TYPE: Results -> GLCapabilities - GLX_COLORINDEX_BIT only not supported
* JOGL GLDrawableFactory: Expose experimental method createProxySurface(..) ↵Sven Gothel2011-02-281-0/+10
| | | | | | for new windowing system ad-hoc development. WARNING: This method may change ro be removed over time!
* WindowsExternalWGLContext: Tolerate invalid/released hdc (swt, winxp-32bit)Sven Gothel2011-02-221-26/+21
|
* NativeWindow ProxySurface Abstraction and lock/unlock Surface cleanupSven Gothel2011-02-223-92/+27
| | | | | | | | | | | | | - 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
* Win,ARB,GL-2.x: Fix pfd to caps conversion: !pbuffer / CleanupSven Gothel2011-02-115-99/+107
| | | | | | | | | | | This fix enables the configuration win7 64bit chromium2.1 (virtual box 4.0.2 linux host) Querying unsupported pixel format attributes, ie pbuffer, will fail the ARB attribute query functions. Cleanup of SharedResource's, hold all reused flags in win32 impl, ie pbuffer, arb pixelformat, ..
* Win,GDI,SWT: Fix pfd to caps conversion. Added thorough debug code.Sven Gothel2011-02-113-11/+30
| | | | | | | Debug code added for use case: WinXP-32bit, GDI, SWT, where WGL.wglGetCurrentDC() returns a non null value which is invalid. Using the value (hdc) on eg GDI.GetObjectType(hdc) return 0 instead of 3 (OBJ_DC) and GDI.GetPixelFormat(hdc) returns 0 with last error 2000.
* Fix Win/GDI: getAvailableGLCapabilitiesGDI() add offscreen GLCaps as wellSven Gothel2011-02-101-13/+3
|
* Fix code styleSven Gothel2011-02-091-1/+2
|
* Merge branch 'bug_468_ClassCast_exception_on_debug_logging_try_2' of ↵Sven Gothel2011-02-091-1/+4
| | | | https://github.com/WadeWalker/jogl into WadeWalker-bug_468_ClassCast_exception_on_debug_logging_try_2
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-0917-67/+67
| | | | | | | | | | | | | | | 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-0817-0/+3912
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.