From 2c0a0981f7e1376064abd981c79c65c9d1b57410 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 1 Dec 2011 16:43:55 +0100 Subject: 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. --- .../classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java | 4 +++- .../classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jogl/classes/jogamp') 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); -- cgit v1.2.3