aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/windows/WindowsGLContextFactory.java
Commit message (Collapse)AuthorAgeFilesLines
* Merged JSR-231 branch on to the main JOGL trunk. The main trunk now Kenneth Russel2005-10-241-361/+0
| | | | | | | | contains the evolving JSR-231 Reference Implementation and the JSR-231 branch is permanently closed. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@401 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added more debug informationKenneth Russel2005-06-101-0/+8
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@299 232f8b59-042b-4e1e-8c03-345bb8c30851
* Javadoc fixesKenneth Russel2005-05-271-1/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@287 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 118: EXCEPTION_ACCESS_VIOLATION on show of 2nd canvas ↵Kenneth Russel2005-01-311-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ATI-specific) The root cause of this bug was not the new DummyGL code, but severe bugs in ATI's OpenGL drivers where it appears that if an OpenGL context is ever made current on more than one thread during the lifetime of an application, problems begin to occur such as the SetPixelFormat call failing on the just the next newly-created HDC, or all subsequent SetPixelFormat calls failing on all subsequently-created HDCs. This was occurring because the single-threaded ATI workaround's automatic detection mechanism was not being enabled until the first time a context was made current, but by then it was typically too late; the context was made current on the end user's thread during e.g. Frame.show(), and if it was ever made current on another thread (like the AWT event queue thread, which is where all OpenGL operations are performed when the single-threaded workaround is enabled) then the problems would begin. The failure has only been seen on Windows so far; ATI's drivers on X11 seem to be better behaved. The workaround is to check for the presence of ATI's drivers very early during JOGL's initialization, by looking in the system directory for atioglxx.dll, and enabling the single-threaded workaround if it was found. This workaround causes the attached test case to work properly. Also added some more debugging code to make diagnosing problems like these easier in the future. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@196 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 119: Dual-head problems on Windows XP Kenneth Russel2004-11-151-1/+3
| | | | | | | | | Added needed synchronization around creation of dummy windows for wglChoosePixelFormatARB calls. Fixed race condition in StaticGLInfo initialization. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@170 232f8b59-042b-4e1e-8c03-345bb8c30851
* Removed redundant code.gkw2004-10-291-7/+1
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@163 232f8b59-042b-4e1e-8c03-345bb8c30851
* addShutdownHook needed to be wrapped in a call to ↵gkw2004-08-171-2/+8
| | | | | | AccessController.doPrivileged in order to work with applets and Web Start. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@153 232f8b59-042b-4e1e-8c03-345bb8c30851
* Bug fix from user GKW on the JOGL forums for problems reported by Kenneth Russel2004-08-031-62/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | users in JOGL 1.1 betas where the code path for wglChoosePixelFormatARB (supporting full-scene antialiasing) was failing on older cards. The old drivers expect an OpenGL context to be current while the wglChoosePixelFormatARB and associated calls are being made, even though the documentation explicitly states that this is not necessary. GKW's fix creates a native window synchronously (independent of the AWT) and associates an OpenGL context with it which is used to choose pixel formats for other windows on the same GraphicsDevice. Upon VM shutdown, a native message pump is started which causes proper disposal of the native window and its OpenGL contexts. There is currently no bug ID associated with this fix, although it may be a component of completely addressing several open bugs. Also includes a bug fix from GKW and kbr for: Issue 98: Just 1st frame rendering on ATI Radeon This was a race condition between JOGL's automatic discovery that the ATI_WORKAROUND was needed and the creation of the first GLCanvas and associated Animator. The need for disabling the setRenderingThread optimization was computed too late, incorrectly locking out other threads (in particular, the AWT event queue thread) from performing rendering of the component. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@144 232f8b59-042b-4e1e-8c03-345bb8c30851
* This putback attempts to address the following issues: Kenneth Russel2004-06-191-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue 59: GLContext Leak Issue 67: Java/Jogl app hangs some systems, not others, during reshape. Issue 69: Error on window resize Issue 89: Losing Backbuffer when Resizing/Moving a window The primary change is to support handing off of the display() implementation to the AWT event queue thread via a new class called SingleThreadedWorkaround in the impl package. This was done to cause the AWT's reshape code to execute on the same thread as all other OpenGL rendering without changing the threading model (e.g., Animator and the ability to manually call display()) visible to the end user. This set of changes appears to work around the problems seen on ATI cards with random corruption when resizing animating windows due to multithreading bugs in the drivers. More testing by a larger community will confirm this fix. Currently the workaround is enabled by default on ATI cards. A secondary but related change is to properly destroy the OpenGL context when a heavyweight component is removed from its container. In order to implement the above workaround, it was necessary to override addNotify and removeNotify to properly track whether GLCanvases were realized; at that point it was a fairly small step to properly delete and recreate OpenGL contexts. The previous heuristics which attempted to determine when a heavyweight had been realized have been removed. A new demo, TestContextDestruction, exercises the new functionality. It does still appear to exhibit resource leaks, however; removing and re-adding the GLCanvas from its parent multiple times causes the system to eventually slow down significantly. More work is needed in this area. However, the demo does now execute as opposed to throwing an exception which was the previous behavior. The current code has been tested on Windows on NVidia hardware with all existing demos with the workaround both enabled and disabled, and on ATI hardware with the existing compatible demos with the workaround enabled. The new abstract method in GLContext, destroyImpl(), has been implemented but not yet tested on X11 and Mac OS X. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@132 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 77: Creation of dummy GL context fails in some configurationsKenneth Russel2004-04-261-0/+2
| | | | | | | | Applied patch from Yuri Vl. Gushchin to disable auto-redraw and auto-swap buffer modes on dummy GLCanvas. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@125 232f8b59-042b-4e1e-8c03-345bb8c30851
* Applied patches from Yuri Vl. Gushchin on JOGL forums: Kenneth Russel2004-04-261-1/+2
| | | | | | | | - Added KTX_buffer_region to glext.h - Used Dialog instead of Frame for dummy window on Windows git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@124 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Issue 76: Multisampling (FSAA) does not work on ATIKenneth Russel2004-04-261-10/+27
| | | | | | | | Applied patch from Yuri Vl. Gushchin to fetch extensions while dummy context is current. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@123 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed (?) Issue 75: Dummy window confuses users and maximizing it can cause ↵Kenneth Russel2004-04-221-1/+7
| | | | | | trouble git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@118 232f8b59-042b-4e1e-8c03-345bb8c30851
* Initial support for multisample / full-scene antialiasing (FSAA); Kenneth Russel2004-04-131-0/+59
| | | | | | | currently on Windows, X11 and other ports to follow git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@108 232f8b59-042b-4e1e-8c03-345bb8c30851
* Fixed Javadoc problemsKenneth Russel2004-04-121-0/+8
| | | | git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@107 232f8b59-042b-4e1e-8c03-345bb8c30851
* Added sharing of display lists and textures among OpenGL contextsKenneth Russel2003-07-081-3/+4
| | | | | | | | | through new methods in GLDrawableFactory; GLContext has not been exposed in the public API. Tested with new simple TestContextSharing demonstration on Windows, Linux and Mac OS X. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@18 232f8b59-042b-4e1e-8c03-345bb8c30851
* Initial revisiondjp2003-06-081-0/+56
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@3 232f8b59-042b-4e1e-8c03-345bb8c30851