summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* NEWT OSX: Add native ScreenMode impl. - TODO: Programmatically set the ↵Sven Gothel2011-12-203-12/+239
| | | | | | | rotation! (How to ?) Get/Set ScreenMode impl on OSX. Set is limited to resolution and size, since I don't know how to change the rotation.
* NEWT initScreenModeStatus(): Issue setScreenSize() to update screen size ↵Sven Gothel2011-12-202-2/+13
| | | | | | | | based on native RANDR (more correct) Clarify Screen's getWidth(), getHeight() values (-> rotated) Also add DEBUG output for collected native modes and nativeIdx mapping.
* GLBuffer: Add NV_texture_shader HILO format and HILO16 typev2.0-rc5rc_fiveSven Gothel2011-12-191-8/+24
|
* Fix SWT test on OSX 32/64 bit ; Fix TestSWTAWT01GL for OSXSven Gothel2011-12-192-41/+52
| | | | | | | | | | | Fix SWT test on OSX 32/64 bit: - Pick 32bit SWT for 32bit tests Fix TestSWTAWT01GL for OSX: - Using proper thread for AWT and SWT actions, platform agnostic but required for OSX. - Enable SWT*AWT* tests on OSX
* TestInitConcurrentNEWT: Nice window layout - don't wait/sync for start ↵Sven Gothel2011-12-181-16/+52
| | | | thread, only for shutdown.
* Fix bug 531. Thx to Sebastien (finding) and Julien (fixing) it.Sven Gothel2011-12-181-3/+3
| | | | | | | https://jogamp.org/bugzilla/show_bug.cgi?id=531 Sorry .. we normally don't add credits in these git logs, maybe we should change that to encourage contributors!?
* CgDynamicLibraryBundleInfo: Add TempJarCache usage for atomic native jar (of ↵Sven Gothel2011-12-184-1/+24
| | | | | | | atomic java JAR) - GLProfile, NWJNILibLoader, NEWTJNILibLoader: Issue Platform.initSingleton() upfront within priviledge block.
* Fix regression of commit 47dc069104723f3d2e8d9ebdd700182e067163d0: Lock ↵Sven Gothel2011-12-181-131/+140
| | | | shared surface before using it's HDC for pbuffer creation
* No GLCanvas offscreen surface (as in NEWT) - test disabledSven Gothel2011-12-181-1/+2
|
* JAWT_DrawingSurface.c: Fail fast in case of NULL platformInfo or ↵Sven Gothel2011-12-181-0/+7
| | | | sizeof(platformInfo)==0
* MaxOSXWindowSystemInterface: deleteContext / releaseNSOpenGLLayer:Sven Gothel2011-12-172-10/+25
| | | | | - release on main-thread doesn't wait anymore - use recursive lock
* MacOSXCGLContext Offscreen Layer: Throw exception in case drawable is not ↵Sven Gothel2011-12-171-2/+5
| | | | realized or texture size is invalid.
* New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and ↵Sven Gothel2011-12-179-130/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage. JAWTWindow.destroy(): - No more getGraphicsConfiguration().getScreen().getDevice().close() call, since the configuration (hence the device) is passed @ creation and owned by the caller. New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation) - Abstract offscreenLayer option to be delegated by using classes - Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT) Fix GLCanvas OffscreenLayerSurface usage - common 'createDrawableAndContext()' for context and drawable instance creation - addNotify() calls createDrawableAndContext() after super.addNotify() to be able to lock the surface (JAWTWindow) and hence to determine offscreen usage. - reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer - dispose() explicitly destroys the JAWTWindow NewtCanvasAWT: - explicitly close the device of the JAWTWindow (as GLCanvas does) Tests: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
* GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) ↵Sven Gothel2011-12-1711-41/+40
| | | | | | | | | | | | | | @ creation GLDrawableFactory*.createOffscreenDrawable(): No implicit setRealized(true) @ creation, following deferred creation like onscreen drawables. This allows using offscreen drawables in classes like GLCanvas, where realization is deferred due to pending valid size. Only createGLPBuffer() realizes the offscreen pbuffer drawable immediatly to reduce the impact on user-code. GLDrawableFactoryImpl.createGLDrawable(): - Simplify OffscreenLayerSurface validation and check it first regardless of the chosenCaps to get a chance to use pbuffer.
* GLDebugMessageHandler: Move Windows 32bit exclusion to init() block ↵Sven Gothel2011-12-131-13/+12
| | | | signaling no extension is available.
* GLDebugMessageHandler: Disable Windows 32bit due to 32bit on 64bit ↵Sven Gothel2011-12-132-15/+34
| | | | JVM/OpenGL-Driver issues
* MacOSXCGLContext.isGLProfileSupported(): No GL3* on pre lion - early outSven Gothel2011-12-131-0/+5
|
* setGLFunctionAvailability(..): Reduce the calls to resetProcAddressTable() ↵Sven Gothel2011-12-1311-44/+123
| | | | | | | | | | | 12 -> 7 in initialization. Reducing the calls to resetProcAddressTable() 12 -> 7 in initialization, saves: Linux/AMD: 600ms -> 300ms Linux/NV: 161ms -> 112ms OSX 10.7/NV: 522ms -> 397ms Still some freezes on OSX 10.6.8/NV .. further analysis is going on.
* Fix nano -> milli (10e6 -> 1e6) .. ooopsSven Gothel2011-12-135-19/+19
|
* Fix GLDrawableFactory lack of GLProfile initialization in case get*Factory() ↵Sven Gothel2011-12-1310-9/+148
| | | | is called 1st, add tests. Add performance numbers of init/shutdown in tests.
* JOGLNewtApplet1Run: Config and add GLEventListener before hooking ↵Sven Gothel2011-12-111-7/+7
| | | | GLWindow/NewtCanvasAWT to AWT Applet Container
* GLDrawableHelper.reshape(): check whether to call GLEventListener's init() ↵Sven Gothel2011-12-111-3/+8
| | | | hook or not
* Fix concurrency bug of GLProfile initialization ; Fix SharedResourceRunner ↵Sven Gothel2011-12-1167-311/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dead' thread (Applets) GLDrawableFactory: - clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..) - add: getSharesResourceThread() GLProfile: - proper locking of initSingletion(..) path: - Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread while creating it's the sharedResource. This simplifies and fixes GLProfile's locking code. - Fix and simplify initSingleton(boolean) API doc - mark it deprecated. - Add initSingleton() for controlled initialization only, pairing w/ shutdown(..) Remove initSingleton(boolean) calls in code and test! +++ Fix SharedResourceRunner 'dead' thread (Applets) In Applets, stopping an Applet makes the browser Java plugin interrupting and killing all related threads, including our SharedResourceRunner thread. - Validate whether the shared resource thread is alive - Catch interruption in shared resource thread and assume it's a kill signal - releaseSharedResource: clear devicesTried set
* NEWT EVENT_MOUSE_WHEEL_MOVED: Fix Bug 413 - Generate proper mouse wheel events.Sven Gothel2011-12-026-16/+75
| | | | | | | | | | > 0: UP < 0: DOWN See MouseEvent.getWheelRotation() for details. OSX/Windows: Default to wheel 'button' 1 OSX: Properly report '<0' X11: Synthesize wheel events by mapping buttons 4/5 and 6/7 to wheel 1 and 2.
* Remove GLProfile.initSingleton(..) out of static init blockSven Gothel2011-12-021-4/+0
|
* Test AWT Translucency: Use ReflectionUtil to use com.sun.awt.AWTUtilities, ↵Sven Gothel2011-12-022-4/+20
| | | | n/a on some AWT impl.
* More AWT-EDT invokeAndWait-wrapping for Frame show/disposeSven Gothel2011-12-024-53/+54
|
* New GLProfile.ShutdownType: SHARED_ONLY / COMPLETE - Enhance/Fix Lifecycle ↵Sven Gothel2011-12-0121-129/+619
| | | | | | | | | | | | | | | | | | | | | Management - Leave Platform, .. TempJarCache untouched. - GLDrawableFactoryImpl*: Leave DynamicLibraryBundle(lib-binding) untouched, for NativeLibrary, JNILibLoaderBase (JNI libs), .. consistency. - SHARED_ONLY: shutdown shared GLDrawableFactoryImpl* resources and NativeWindowFactory - COMPLETE: additionally shutdown GLContext* Clear all cached GL/GLX proc-address and device/context mappings. - Use new "GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY)" in Applets - X11GLXDrawableFactory Shutdown: Uncomment close/destroy of shared resources. - JAWTWindow.destroy(): Close the delegated device. In case it's X11 this closes the exclusive opened X11 Display.
* GLContext fix shutdown(): Clear proc address tables and extension cache ↵Sven Gothel2011-12-012-5/+12
| | | | (GLContextImpl)
* Fix 96205926731aeb61a862c87974f611d814937c54 GDIUtil native code.Sven Gothel2011-12-011-1/+1
|
* Fix Bug 522: NEWT requestFocus() causes a crash if !isNativeValid()Sven Gothel2011-12-011-1/+1
|
* Adapt to GlueGen commit 7e6cf46ed2e0e9772f79e06437596056efa8c682: ↵Sven Gothel2011-12-012-2/+2
| | | | JNILibLoaderBase addNativeJarLibs(..)
* Minor edits.Sven Gothel2011-12-017-27/+39
|
* X11Util / GDISurface RobustnessSven Gothel2011-12-012-48/+58
| | | | | | | | X11Util: - shutdown: keep list of displays, if not really closed. - Init default display name in initSingleton. GDISurface: Check ReleaseDC and throw exception if fails
* Complete commit 2c0a0981f7e1376064abd981c79c65c9d1b57410 ; Missed native impl.Sven Gothel2011-12-011-17/+17
|
* GLProfile: use dbl checked locking w/ volatile ; Proper shutdown sequence.Sven Gothel2011-12-011-26/+36
|
* GLDrawableFactory: Implementations lifecycle is handled via ↵Sven Gothel2011-12-015-143/+211
| | | | constructor/destroy()
* Move manual GDI utils to GDIUtil ; Minor cleanup.Sven Gothel2011-12-018-45/+159
| | | | | | RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass. This enables the shutdown hook to clear the factories state, which is required for proper recreation.
* JOGLNewtApplet1Run: Issue GLProfile.shutdown() to adapt to the 'new' plugin ↵Sven Gothel2011-11-301-3/+5
| | | | | | | | | | | | lifecycle. Applet 'restart' (init.start.stop.destroy .. init.start...) didn't work on Windows browsers (Firefox, Safari, Chrome, ..) w/ JVM 6u26..6u29. It seems that after destroy we loose the ClassLoader already (plugin2) hence we need to bind to the native resources again. Solution is to map the JOGL lifecycle of GLProfile [initSingleton()..shutdown()] to the Applet's [init..destroy].
* More Robust GLProfile Initialization ; Add NativeWindowFactory ShutdownSven Gothel2011-11-309-25/+83
| | | | | | | | | | | | More Robust GLProfile Initialization - Catch GLException in GLDrawableFactory getWasSharedContextCreated(device) impl., which may fail (See comment on Firefox/Chorme EGL deployed library for Windows). - If getWasSharedContextCreated(devide) fails, set respective factory availability to false, ie. hasDesktopGLFactory, hasEGLFactory, .. Add NativeWindowFactory Shutdown - Currenly a dummy entry, may evolve. X11Util shutdown is issued by respective GLDrawableFactory
* NEWTMacWindow:View: Make lock recursive ..Sven Gothel2011-11-292-15/+26
| | | | | Attempt to fix the shared-context-multithreading bug (eg. TestSharedContextVBOES2NEWT2) via proper locking .. but seems not to be sufficient (yet).
* NEWT MacWindow: the softLock (pthread mutex) is now always blocking (remove ↵Sven Gothel2011-11-291-18/+0
| | | | non blocking code)
* GLContextImpl*: createImpl() / makeCurrentImpl() refinement / robostnessSven Gothel2011-11-2915-49/+120
| | | | | | | | | | | | | | | createImpl(): If successful must leave context current. makeCurrentImpl(): Is only called if context is not just created, hence the boolean parameter 'boolean newCreatedContext' is removed. This clearifies and actually cleans up the native makeContextCurrent/releaseContext call pairs. MacOSXCGLContext: CGL and NS impl. of native makeContextCurrent/releaseContext uses CGL locking to provide a thread safety. This is recommended in OS X OpenGL documentation on [shared context] multithreaded use cases. Post creation code, as seen in some pbuffer cases is moved to overriden createImpl() methods.
* Test: Add TestSharedContextVBOES2NEWT2 (ES2 variant of ↵Sven Gothel2011-11-292-2/+160
| | | | TestSharedContextListNEWT2)
* Test: Forgot to uncomment package name of new test for ↵Sven Gothel2011-11-291-1/+1
| | | | 97218b88af9113740b3704a3666d7356cdc83cd0
* NEWT ScreenMode: Use unified ScreenMode in impl; X11Screen: Be verbose if TO ↵Sven Gothel2011-11-282-7/+7
| | | | reached, ie not successfully changed mode.
* Fix Bug 527: Creating a context w/ shared context, while the latter is in ↵Sven Gothel2011-11-2810-55/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* NEWT MacWindow: Fix positionChange() Usage ; Fix getLocationOnScreenImpl()Sven Gothel2011-11-271-32/+27
| | | | | | | | | - Native invocation of positionChange(x,y) uses screen coordinates of client area. Manual invocation shall respect the semantics - hence calling super.positionChanged w/ client coords. - getLocationOnScreenImpl() shall return the screen coordinates of the client area - Use getTopLevelLocationOnScreen(), ie substract Insets of getLocationOnScreenImpl()
* MacWindow: Impl. DriverUpdatePosition; Alias position2TopLevel -> ↵Sven Gothel2011-11-275-73/+88
| | | | | | | | getLocationOnScreenImpl Since the MacWindow position needs to be changed in concert with the parent, we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()' if DriverUpdatePosition is implemented.
* JAWTWindow: Impl. insets (if AWT component is a Container)Sven Gothel2011-11-271-3/+14
|