diff options
author | Sven Gothel <[email protected]> | 2010-11-14 09:04:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-14 09:04:45 +0100 |
commit | 83d3a3f2ea8dc328e621b3abbe671f46379c7e65 (patch) | |
tree | b7fafe2ef1610a6be0723316ae5bf5938b9f222d /src/jogl/classes/javax/media/opengl/awt | |
parent | c3bfb82614e9fa0f8ea7169cd412a6f0c71973e0 (diff) |
JOGL: Complete eager and lazy mapping of GLProfiles in respect to multiple device.
AbstractGraphicsDevice's 'connection' and 'type' attribute is used as a unique key
to map GLProfiles and GLContext's major/profile -> major/minor/profile mapping.
Eager initialiaztion as well as lazy is supported to maintain a simple API.
This is currently tested on X11, where one app display NEWT/GL window and content
on the local and remote device.
See TestRemoteWindow01NEWT.java and TestRemoteGLWindows01NEWT.java
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 12 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 9db718bfb..c0f2736fb 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -83,7 +83,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { static { DEBUG = Debug.debug("GLCanvas"); - defaultGLProfile = GLProfile.getDefault(); + defaultGLProfile = GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()); } private GLProfile glProfile; @@ -795,11 +795,11 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { * A most simple JOGL AWT test entry */ public static void main(String args[]) { - System.err.println(GlueGenVersion.getInstance().getInfo(null)); - System.err.println(NativeWindowVersion.getInstance().getInfo(null)); - System.err.print(JoglVersion.getInstance().getInfo(null)); + System.err.println(GlueGenVersion.getInstance()); + System.err.println(NativeWindowVersion.getInstance()); + System.err.print(JoglVersion.getInstance()); - GLCapabilities caps = new GLCapabilities( GLProfile.getDefault() ); + GLCapabilities caps = new GLCapabilities( GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()) ); Frame frame = new Frame("JOGL AWT Test"); GLCanvas glCanvas = new GLCanvas(caps); @@ -809,7 +809,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { glCanvas.addGLEventListener(new GLEventListener() { public void init(GLAutoDrawable drawable) { GL gl = drawable.getGL(); - System.err.println(JoglVersion.getInstance().getGLInfo(gl, null)); + System.err.println(JoglVersion.getInstance().toString(gl)); } public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index b9bbf71c2..955e51e69 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -1275,7 +1275,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { public GLProfile getGLProfile() { // FIXME: should do better than this; is it possible to using only platform-independent code? - return GLProfile.getDefault(); + return GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()); } public void handleReshape() { |