diff options
author | Sven Gothel <[email protected]> | 2011-12-01 16:43:55 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-01 16:43:55 +0100 |
commit | 2c0a0981f7e1376064abd981c79c65c9d1b57410 (patch) | |
tree | 272ad58d1ca39641c8b389ce8056f06e5d62fc54 /src/jogl/classes/jogamp | |
parent | 77e9d16a3ad5131a2197bb3cad2309827c3a796a (diff) |
Move manual GDI utils to GDIUtil ; Minor cleanup.
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.
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java | 4 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java index 2980c22c5..0bd83b923 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java @@ -46,6 +46,8 @@ import javax.media.opengl.GLProfile; import javax.media.nativewindow.AbstractGraphicsScreen; import jogamp.nativewindow.windows.GDI; +import jogamp.nativewindow.windows.GDIUtil; + import javax.media.nativewindow.NativeSurface; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLException; @@ -96,7 +98,7 @@ public class WindowsDummyWGLDrawable extends WindowsWGLDrawable { protected void destroyImpl() { if (handleHwndLifecycle && hwnd != 0) { GDI.ShowWindow(hwnd, GDI.SW_HIDE); - GDI.DestroyDummyWindow(hwnd); + GDIUtil.DestroyDummyWindow(hwnd); hwnd = 0; } } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 6b75b6504..1b2b0fa4f 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -70,6 +70,7 @@ import com.jogamp.common.util.VersionNumber; import jogamp.nativewindow.WrappedSurface; import jogamp.nativewindow.windows.GDI; +import jogamp.nativewindow.windows.GDIUtil; import jogamp.nativewindow.windows.GDISurface; import jogamp.nativewindow.windows.RegisteredClassFactory; import jogamp.opengl.DesktopGLDynamicLookupHelper; @@ -274,7 +275,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice); } final int f_dim = 64; - long hwnd = GDI.CreateDummyWindow(0, 0, f_dim, f_dim); + long hwnd = GDIUtil.CreateDummyWindow(0, 0, f_dim, f_dim); WindowsDummyWGLDrawable sharedDrawable = WindowsDummyWGLDrawable.create(WindowsWGLDrawableFactory.this, glp, absScreen, hwnd, f_dim, f_dim, true); if (null == sharedDrawable) { throw new GLException("Couldn't create shared drawable for screen: "+absScreen+", "+glp); |