aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/windows
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-24 05:11:29 +0200
committerSven Gothel <[email protected]>2010-04-24 05:11:29 +0200
commit1ad8c39df6b097c80ba7a85badf555e7f669cc3f (patch)
tree740606f85dafdef5d5958498b080873c7bf188dd /src/jogl/classes/com/jogamp/opengl/impl/windows
parent778225504c00c7ca03386b6eabfbda929542130f (diff)
NEWT/AWT Interoperability
- Moved all event classes to com.jogamp.newt.event and the new AWT event helper to com.jogamp.newt.awt.event - Added Newt<Type>Adapter for convenience - Added AWT<Type>Adapter for - Using AWT agnostic NEWT event listener see com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT even for AWT see com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsAWT (Nice idea by mbien) - Forwarding AWT events to NEWT (refactoring) Misc - GLDrawableFactory.shutdown() is now protected and called by the JVM shutdown hook. Hence removing the validate().
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index a4bf89b81..ee4592adf 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -92,17 +92,14 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
boolean canCreateGLPbuffer = false;
protected final GLDrawableImpl getSharedDrawable() {
- validate();
return sharedDrawable;
}
protected final GLContextImpl getSharedContext() {
- validate();
return sharedContext;
}
- public void shutdown() {
- super.shutdown();
+ protected void shutdown() {
if (DEBUG) {
System.err.println("!!! Shutdown Shared:");
System.err.println("!!! CTX : "+sharedContext);
@@ -119,7 +116,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public GLDrawableImpl createOnscreenDrawable(NativeWindow target) {
- validate();
if (target == null) {
throw new IllegalArgumentException("Null target");
}
@@ -127,7 +123,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
protected GLDrawableImpl createOffscreenDrawable(NativeWindow target) {
- validate();
if (target == null) {
throw new IllegalArgumentException("Null target");
}
@@ -135,12 +130,10 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
- validate();
return canCreateGLPbuffer;
}
protected GLDrawableImpl createGLPbufferDrawableImpl(final NativeWindow target) {
- validate();
if (target == null) {
throw new IllegalArgumentException("Null target");
}
@@ -174,7 +167,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
protected NativeWindow createOffscreenWindow(GLCapabilities capabilities, GLCapabilitiesChooser chooser, int width, int height) {
- validate();
AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault();
NullWindow nw = new NullWindow(WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
capabilities, chooser, screen) );
@@ -183,22 +175,18 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public GLContext createExternalGLContext() {
- validate();
return WindowsExternalWGLContext.create(this, null);
}
public boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) {
- validate();
return true;
}
public GLDrawable createExternalGLDrawable() {
- validate();
return WindowsExternalWGLDrawable.create(this, null);
}
public void loadOpenGL32Library() {
- validate();
if (hopengl32 == 0) {
hopengl32 = WGL.LoadLibraryA("OpenGL32");
if (DEBUG) {
@@ -210,7 +198,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public void loadGLULibrary() {
- validate();
if (hglu32 == 0) {
hglu32 = WGL.LoadLibraryA("GLU32");
if (hglu32 == 0) {
@@ -220,7 +207,6 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public long dynamicLookupFunction(String glFuncName) {
- validate();
long res = WGL.wglGetProcAddress(glFuncName);
if (res == 0) {
// It may happen that a driver doesn't return the OpenGL32 core function pointer
@@ -253,13 +239,11 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl implements
}
public boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device) {
- validate();
return false;
}
public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
throws GLException {
- validate();
throw new GLException("Unimplemented on this platform");
}