summaryrefslogtreecommitdiffstats
path: root/make/stub_includes
Commit message (Collapse)AuthorAgeFilesLines
* NativeWindow ProxySurface Abstraction and lock/unlock Surface cleanupSven Gothel2011-02-222-0/+5
| | | | | | | | | | | | | - 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
* Adding NVIDIA 'Threaded optimization' workaround/fix at initialization on ↵Sven Gothel2010-12-192-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows for javaws/applets. It has been observed that for some combinations, eg: - Windows 7 64bit (other variants may apply too) - NVIDIA 8600M GT - 260.99 the NVIDIA setting of 'Threaded optimization' := 'auto' (default) causes the JVM to simply crash in case of javaws and [jnlp] applets. 'Threaded Optimization' := 'off' works reliable 'Threaded Optimization' := 'on' never works with javaws and applets on the above configuration A user could workaround this by setting 'Threaded Optimization' := 'off', however, this would disable many users on the spot, since you cannot ask the average user for such a task, if she only wants to see a web page. This patch 'fixes' the 'auto' mode by running the eager GL profile initialization within a block of single CPU affinity: SetProcessAffinityMask(pid, 1); try { initProfilesForDeviceImpl(device); } finally { SetProcessAffinityMask(pid, sysValue); } Hopefully we can remove this hack with a driver fix. However this workaround is as little invasive as possible.
* Fix WGL Bitmap Offscreen DrawableSven Gothel2010-12-161-2/+2
| | | | | | | | | | | 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.
* Windows RegisterClass: Use new RegisteredClassFactory (window class), Misc.Sven Gothel2010-12-122-1/+2
| | | | | | | | | | | | | | | | | 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.
* GDI: Add GetObjectType(..)Sven Gothel2010-12-101-0/+19
|
* GDI: Fix CreateDummyWindow: Use local getModuleHandle(NULL) and synchronize ↵Sven Gothel2010-12-091-1/+1
| | | | factory method.
* NativeWindow/GDI: Adding ERROR_SUCCESS to make the code more clear.Sven Gothel2010-11-251-1/+2
|
* NativeWindow/Windows: Fix CreateDummyWindow gluegen and usageSven Gothel2010-11-222-1/+2
| | | | NativeWindow+JOGL/Windows: Complete Opaque types
* NativeWindow: Fix XSynchronize gluegenSven Gothel2010-11-221-1/+1
|
* Move GDI GlueGen wrapping from JOGL -> NativeWindow (following X11). Moving ↵Sven Gothel2010-11-171-0/+0
| | | | NEWT WindowsWindow GetRelativeLocation() native implementation to GDI as well.
* Added proper Khronos license tag (found it)Sven Gothel2010-11-091-0/+23
|
* Fix double declarationSven Gothel2010-11-081-4/+0
|
* Move win32 RECT structure to windows.hSven Gothel2010-11-083-14/+8
|
* Changed files wingdi.h/winwgl.h with content from w64 mingw-runtime ↵Sven Gothel2010-11-083-94/+99
| | | | package's mingw64/x86_64-w64-mingw32/include/wingdi.h (Public Domain) ; Fix wglext.h RECT
* Add gluegen stdarg.h and inttypes.hSven Gothel2010-11-072-0/+14
|
* Fix CG header, according to PCPP fixSven Gothel2010-11-071-9/+9
|
* Minor gluegen 'loader file' changeSven Gothel2010-11-0610-5/+16
|
* Minor patch to headers for gluegen ; GLES2 extensionsSven Gothel2010-11-0610-58/+68
| | | | | | - ifndef GLAPI - GLES2/gl2ext.h add a few basic extensions - gl-64bit-types.h: use khronos 64bit types
* Move common -> gluegen, emphasizing it's use case (only for gluegen code ↵Sven Gothel2010-11-063-0/+0
| | | | generation)
* Accomodate GlueGen's new build in type, ie dummy stdint.h / stddef.hSven Gothel2010-11-063-24/+57
| | | | Needs GlueGen 6b6b9b3b81cdc85b7260664ebec547756a6be5d7, branch sgothel_wip_fixes01.
* EGL: Fix gluegen usage, use khronos 64bit typedefsSven Gothel2010-11-062-7/+20
|
* Fix khronos typedefsSven Gothel2010-11-063-19/+38
| | | | | | - KD: use sys include - KD: use KHR/khrplatform.h - KHR/khrplatform.h: Use stddef.h ptrdiff_t and size_t if possible (fix)
* Move khronos common header to khrSven Gothel2010-11-063-0/+0
|
* Remove NVidia licensed KD and OMX files.Sven Gothel2010-11-045-917/+0
| | | | In case we still need these extensions, add them manually.
* Adding khrplatform.h from khronos 2009-10-21Sven Gothel2010-11-041-0/+269
|
* Adding patches for gluegen interoperability and adding some extensions:Sven Gothel2010-11-041-1/+8
| | | | - gl2.h: adding ifndef core extension and profiles for gluegen
* Replaced with khronos versions: gl2platform.h 2.0 2010-03-04, gl2.h 2.0 ↵Sven Gothel2010-11-043-275/+945
| | | | 2010-03-04, gl2ext.h 2010-11-03
* Adding patches for gluegen interoperability and adding some extensions:Sven Gothel2010-11-042-6/+31
| | | | | - all: changed 'TYPE name[3]' -> 'TYPE * name' for gluegen - gl.h: adding ifndef core extension and profiles for gluegen
* Replaced with khronos versions: glplatform.h 1.1 2010-03-04, gl.h 1.1 ↵Sven Gothel2010-11-043-314/+628
| | | | 2010-03-04, glext.h 2010-07-27
* Adding patches for gluegen interoperability and adding some extensions:Sven Gothel2010-11-043-9/+51
| | | | | | - eglplatform.h: if platform not recognized, use 'void pointer' for EGLNativeDisplayType, EGLNativeWindowType and EGLNativePixmapType - egl.h: adding ifndef core extension for gluegen and eglGetProcAddress - eglext.h: adding EGL_NV_texture_rectangle, EGL_NV_system_time, EGL_NV_omx_il_sink, EGL_RMSURFACE_NV
* Replaced with khronos versions: egl 1.4 2009-10-21, eglext 8 2010-11-03, ↵Sven Gothel2010-11-043-251/+261
| | | | eglplatform 2010-08-25
* Adding Win MSC patchSven Gothel2010-11-041-0/+5
|
* Replaced with khronos 1.0.3 versionSven Gothel2010-11-042-82/+13
|
* Fixed gl3.h GL_GLEXT_PROTOTYPES -> GL3_PROTOTYPES/GL_GL3EXT_PROTOTYPESOpenGL_4_1_IntegrationOpenGL_3_3_IntegrationSven Gothel2010-08-253-21/+9
|
* Add license header to gl3ext.hSven Gothel2010-08-241-0/+28
|
* Modifications to the original header: Seperate platform types; Move ↵Sven Gothel2010-08-242-221/+161
| | | | extension related details of the GL_VERSION_x_y blocks into their extension block
* Add original Khronos glext.h and gl3.h headers from 2010-08-03Sven Gothel2010-08-242-0/+14292
|
* Redo khronos header migration from scratch to show the delta to the originalsSven Gothel2010-08-242-14232/+0
|
* Add OpenGL 3.3, 4.0 and 4.1 language mapping.Sven Gothel2010-08-2416-3031/+6693
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update header: - GL/glext.h to khronos 2010-08-03 - GL3/gl3.h to khronos 2010-08-03 - Move platform code to GL/glplatform.h GL3/glplatform.h - Unify 64bit typedefs: gl-64bit-types.h - Move GL 3.[123] and 4.[01] complete subsumed extension enums and functions into their extension spec and just reference them. This ensures proper extension availability via lower OpenGL profiles, hence a proper GL2GL3 interface. - GL3/GL4 cleanup: - make-glextension-depignore.sh: determine required GL version for extensions for proper positioning, ie GL2GL3 or GL3 or GL4 via gluegen IgnoreExtension commands. - use ARB_ES2_compatibility for common GL2ES2 methods, if available - consolidated gl2-gl4 subsumed extension to gl-common.cfg - Missing GL3/GL4 Functions: glMultiDrawElementsBaseVertex glDebugMessageCallbackARB glDebugMessageCallbackAMD - TODO (new feature integration): - ARB_ES2_compatibility / ARB_get_program_binary for com/jogamp/opengl/util/glsl, ie - store binaries com/jogamp/opengl/util/glsl/sdk/CompileShader* - query supported binary formats (enums ?) - optional prio binaries - ARB_ES2_compatibility, if available GLES2/GL2ES12 would be available - ARB_separate_shader_objects for com/jogamp/opengl/util/glsl, ie - swizzle vertex/fragment shader in programs - ..
* Fix file modesSven Gothel2010-07-0741-0/+0
|
* Fix: Locking/Threading; Common IntIntHashMap and Buffers; Fix: ↵Sven Gothel2010-06-108-48/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glMap*Buffer*; GLX/WGL/CgGL: All runtime dynamic; Misc .. TODO: Compile and test on MacOSX .. Fix: ===== Multithreading/Locking: See jogl/doc/Implementation/MultiThreading.txt - Locking layer is not platform agnostic, ie GLContextImpl, GLDrawableImpl, .. and NEWT: Window/Display - No more use of JAWT global lock necessary, removed. - No need for X11 Display lock, on the contrary, this made the NV driver hang. - Use common window/surface lock - All NativeWindow surfaceLock's are recursive now glMapBuffer: If size is 0, don't do cont with the native call. glMapBufferRange: Fix capacity. glNamedBufferDataEXT: Track the size. glMapNamedBufferEXT: Manual impl. - use the tracked size glXGetVisualFromFBConfig, glXChooseFBConfig, glXChooseVisual: Instead of ignoring and implement a renamed version (*Copied), we just use ManualImplementation for the proper copy-result code. DesktopGLDynamicLookupHelper: Initialize _hasGLBinding* attributes in the determing loadGLJNILibrary() method, which is called by super(). Otherwise static init will overwrite them after the super() call. X11GLXDrawableFactory: Don't release anything at shutdown (removed sharedContext.destroy()), since this caused a freeze/SEGV sometimes. Fixed NEWT's reparentWindow() functionality incl NewtCanvasAWT usage. - Native: if not visible, don't focus, etc - NewtCanvasAWT: Use the container size to start with - Run the command on the EDT Using GlueGen's new DynamicLibraryBundle utility: - X11, Windows and MacOSX OpenGL adapted to DynamicLibraryBundleInfo. - X11GLXDynamicLookupHelper -> X11GLXDynamicLibraryBundleInfo - Remove all path from lib names. - GL order: libGL.so.1, libGL.so, GL - shallLinkGlobal: true -> to server some 'old' DRI systems -> http://dri.sourceforge.net/doc/DRIuserguide.html - shallLookupGlobal: false - Try both : glXGetProcAddressARB and glXGetProcAddress - Using bootstrap: GLX.glXGetProcAddress(long glxGetProcAddressHandle, String glFuncName) Found the issue with LIBGL_DRIVERS_PATH, ie if not set no valid GL instance can be found (ie ATI fglrx/DRI). This may happen if using a differen user than the desktop user for whom the env var is set within some /etc/X11/Xsession.d/ script. Enhancements: ============= GLBufferSizeTracker: Use IntIntHashMap and add DirectState size tracking. GLBufferStateTracker: Use IntIntHashMap. GLStateTracker: Use IntIntHashMap. GLDynamicLookupHelper: More generic (global loading/lookup and GetProcAddress function name list), remove redundant code. FIXME: MacOSXCGLDynamicLookupHelper: - Not tested - Not using NSImage lookup anymore as recommended by OSX API Doc, so dlsym is used always (to be tested) WindowsWGLDynamicLookupHelper: - Not tested GLX/WGL/CgGL is all runtime-dynamic as now, ie loaded and looked-up at runtime, no compile time dependencies to GL anymore, nor a need to specify CgGL. Split up WGL in GDI and WGL, to allow proper dynamic runtime linkage of OpenGL32 while using static binding to GDI32 NEWT events generated by native code are enqueued and not send directly. This should ease locking mechanisms .. if any are necessary. NEWT: More platform specific code moved to *Impl method, simplifying the generic code of the superclass and impl protocol. Cleanup: ========= Replace all InternalBufferUtil's with com.jogamp.common.nio.Buffers Removed all InternalBufferUtil's from repository Removed GLContextImpl notion of 'optimized' surface locking, where the surface gets unlocked during makeCurrent/release. This just makes no sense and would impact multithreading in a horrible way.
* JOGL: Unify library loading (impl and binding), incl. lookup ; ↵Sven Gothel2010-06-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | GLAutoDrawable: dispose() calls only with created context. - Using the EGL approach of DynamicLookupHelper, now generalized in abstract GLDynamicLookupHelper, DesktopGLDynamicLookupHelper and EGLGLDynamicLookupHelper. The implementation of these are self contained. - Sharing common code. - Unifying implementation and binding loading, as well as the function lookup within the impl libs. - Removed DRIHack, since its no more required due to the new DesktopGLDynamicLookupHelper. - Removed compile time link to GL and GLU libs - Removed redundant library OS functions from X11/WGL bindings, GlueGen's common code is being used now. - GLAutoDrawable: dispose() calls only with created context. This cleans up stack traces in case of eventual bugs, where context creation is not successful.
* Changed NEWT NativeWindow creation contract - AWT/NEWT Parenting - Misc FixesSven Gothel2010-05-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | +++++ Changed NEWT NativeWindow creation contract Original contract: (1) A native window was created as soon as possible, ie when NEWTFactory.createWindow(..) was called - if possible. (2) A valid native window has to be created at least after setVisible(true) has been called. Problems: Not all implementation are able to create the native window that early, but at setVisible(true) only (e.g: KD and EGL). Due to window parenting especially the new AWT/NEWT parenting, the native window can only be created in case the parent native window is valid. New contract: (1) A native window is created at setVisible(true), if it's a top level window or the native parent window is valid. (2) A valid native window may not be created after setVisible(true) has been called. Subsequent setVisible(true) calls shall be made in case the creation has not been done yet. This is demonstrated in GLWindow.display() for example. The new contract implements a lazy native window creation. +++++ AWT/NEWT Parenting - HierarchyListener and ComponentListener ensure that the NEWT child window will be setVisible according to the AWT parent window. - Lazy native window creation relaxes requirements to the parent window's state. - Attachment of the child window and setVisible() may be called after NEWT child window creation. - GLWindow supports NEWT child window creation directly The test case TestParenting01AWT.java reflect this new contract and demonstrates more simplified and more flexible use cases. +++++ NEWT Fixes: - All NEWT implementation's native code method names end with 0. - GLWindow: don't issue the actual 'init'/'display' call to GLEventListeners in case the window is not visible. - NEWT setSize/setPosition: if native-window call native-window action and let the attributes being set by the feedback call, which issues more action, ie RESIZE. else set the attributes directly, no feedback call/action is necessary. +++++ X11 Fixes: - X11GLContext MakeContextCurrent: Use MakeCurrent in case write and read drawable are equal, otherwise SEGV happens on ATI with heavy multithreading involved! Even XLockDisplay and XSync didn't help here .. - X11GLXDrawableFactory shared resource: Removed the resource holder thread to simplify code, hence proper release is no more desired and it could become a cause for deadlock. - Moved XInitThreads() from NEWT X11Window -> NativeWindow X11Util, since NativeWindow is loaded first (essential for XInitThreads()) and it is the more basic lib. - Made call to XInitThreads() conditional, ie it's spared if AWT could be used - which causes SEGV .. (AWT bug). See X11Util.java +++++ JOGL Fixes: - GLProfile.isAWTAvailable() -> NativeWindowFactory.isAWTAvailable() - GLProfile.isAWTJOGLAvailable() -> GLProfile.isAWTAvailable()
* JAWT Windows Fix: Use the JAWT window handle entry [to return it]Sven Gothel2010-05-051-1/+4
|
* JOGL GL4 preperation (cont):Sven Gothel2010-04-202-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All available OpenGL versions (native/platform) are verified at GLProfile initialization and can be queried .. A mapping of major,compat -> major,minor,options is created. - Removal of temp context creation, when creating a context. This was necessary to query general availability of ARB_create_context. Due to the shared context of X11GLXDrawableFactory and WindowsWGLDrawableFactory, this is no more necessary. Due to the version mapping, the ARB_create_context paramters are known. - NativeWindow X11Lib: Added X11ErrorHandler, throwing a RuntimeException. Necessary to catch BadMatch .. etc X11 errors, eg for glXCreateContextAttribsARB Hence all X11 calls are covered now. - X11DummyGLXDrawable needs to use an own Window, otherwise GLn n>2 fails - Flattening the desktop GL* implementation, all use GL4bcImpl, which reduces the footprint dramatically. - GL*Impl.isGL*() (desktop) utilizes the GLContext.isGL*(), hence the results reflect the actual native context version. - GLContextImpl makeCurrent/create: Added workflow documentation, clarified code, defined abstract methods to have a protocol. - Removed moved files (from here to gluegen), see gluegen a01cb3d59715a41153380f1977ec75263b762dc6 - NativeLibLoader -> <TYPE>JNILibLoader - Fixed Exception Handling (as in gluegen bce53b52c8638729750c4286dbc04cb14329fd34), ie removed empty catch Throwable .. - GLContext.setSwapInterval(): Nop in offscreen case, otherwise X11IOError (NVIDIA Bug) Test: Tests - Junit - demos.gears.Gears - demos.jrefract.JRefract Platforms - Linux 64/32 ATI/NVidia - MacOsX - Windows (virtualbox 3.1.6, offscreen failed) TODO/BUGS: - FIXME ATI GLn n>2 with AWT, can't make context current, works well on NVIDIA though - FIXME GL3GL4: Due to GL3 and GL4 implementation bugs, we still choose GL2 first, if available! - Add GL 3.3 to GL3/gl3ext.h - Add GL 4.0 to GL3/gl3ext.h and fix the GL3/GL4 seperation - Rename jogl.gl2.jar -> jogl.gldesktop.jar (as done with it's native lib already)
* Further ATI (fglrx) X11Display bug workaround/cleanupSven Gothel2010-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - See https://bugzilla.mozilla.org/show_bug.cgi?id=486277 - Calling XCloseDisplay occasionally leads to a SIGSEGV, even thought the reference is valid and OK. Workaround is not to close any X11Display, but to hold them stashed and reuse them. Since we already pipeline all X11Display's via Nativewindow's X11Util, an added referenceCounter and a global active/passive list solved this problem. This workaround is only active in case 'isVendorATI()'. NEWT/NativeWindow X11: - Let XIOErrorHandler and invalid display references fail hard with FatalError, otherwise we won't see the stack trace - and those bugs are indeed fatal. NativeWindow X11: - Install XIOErrorHandler, which stays active. - X11Util.X11Display: - Add reference counter - Add global active/passive list. Passive if reference count == 0 and marked as 'un-closeable' (-> ATI). Reusing passive members when create a new display. - JOGL: - Use DeleteLocalRef() calls to free temp NIO buffer in manual *Copied implementation. - GLDrawableFactoryImpl: Be serious about the shutdown() semantics - *GraphicsConfiguration: - Fix the invalid Onscreen/PBuffer/Pixmap determination (X11/EGL/WGL) - Just return null if not valid - X11GLXGraphicsConfigurationFactory - FBConfig - Determine recommendedIndex properly .. - Don't bail out if a FBConfig is invalid .. - Use Chooser in case nothing is recommended .. - X11OffscreenGLXDrawable fixes bugs: - wrong (int) cast of parent window in XCreatePixmap call - setting display to zero too early in destruction, ie before XCloseDisplay - X11GLXDrawableFactory is using [singleton] shared dummy resources for - Screen, Drawable and Context which are utilized in case they are needed .. They are removed at shutdown call - GLXVersion gathering in GLXUtil now .. - DefaultGLCapabilitiesChooser: Respect PBuffer selection Tests: - Add DrawableFactory shutdown() - Add various Offscreen Capabilties - Add Offscreen and non-pbuffer case - JUnit Passed (Linux64bit: NVidia/ATI) - demos.jrefract.JRefract passed (Linux64bit: NVidia/ATI)
* ATI (fglrx) PBuffer/X11Display bug workaround/cleanupSven Gothel2010-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - See https://bugzilla.mozilla.org/show_bug.cgi?id=486277 - Description: - To use PBuffer, a context must be current - X11Display cannot be switched while using the PBuffer [within one thread]. Hence we shall try harder to reuse _the_ user configured X11Display - whenever possible. This is actually a good thing, ie cleanup up our code again. - Changes to workaround/cleanup: - GLDrawableFactory* methods 'canCreate*()' are changed to 'canCreate*(AbstractGraphicsDevice)' to allow pipelining the X11Display. This reduces the overhead of using a local TLS X11Display. - WindowsDummyWGLDrawable cstr gets the GLProfile as a parameter now, this is done while adding X11DummyGLXDrawable - forseeing the usecase to query available GLProfiles at startup. - X11DummyGLXDrawable added, following the WindowsDummyWGLDrawable path to have a dummy GLContext current to fix the ATI bug. NativeWindow X11: - Add XIOErrorHandler to identify the fatal failure of closing a Display (-> ATI bug). Build: - Adding ant.jar and ant-junit.jar to the junit compile/run classpath - Misc: - Fix: CreateDummyWindow(..) returns a HWND, not a HDC - mapToRealGLFunctionName: Added mapping for X11/GLX. - X11GLXGraphicsConfigurationFactory: Uncommented dead code 'createDefaultGraphicsConfigurationFBConfig' Tests: Passed (Linux64bit: NVidia/ATI) Todo: More tests on ATI, especially multithreading/X11Display usage.
* Adaptions toSven Gothel2010-03-301-7/+1
| | | | | http://www.jogamp.org/bugzilla/show_bug.cgi?id=392 7220416bcef3140883d3966d921442feae3107c4
* Add uint32_tSven Gothel2010-03-291-0/+2
|
* refactoring: renamed com.sun.opengl -> com.jogamp.opengl.Michael Bien2010-03-274-15053/+0
|