summaryrefslogtreecommitdiffstats
path: root/src/demos/context
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-11-20 23:53:23 +0000
committerKenneth Russel <[email protected]>2008-11-20 23:53:23 +0000
commitf25bdef3b6bc423a08390ab17e86897c85b71282 (patch)
treec15a27782e0c17e6ca2c25ae25cbbd760f9ac6f8 /src/demos/context
parentc91b1be4cd9ab39be883f3578fcc4da3511e1ee1 (diff)
Applied second jogl-demos patch from Michael Bien. Adjusted build.xml
to not try to compile jbullet sources, and to merge the ES1 and ES2 targets. To build the full set of demos (including the OpenGL ES demos), run "ant". To build just the OpenGL ES demos, run "ant -Djogl.es=1". git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@290 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/context')
-rwxr-xr-xsrc/demos/context/DualContext.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/demos/context/DualContext.java b/src/demos/context/DualContext.java
index 8e23f1b..397b10b 100755
--- a/src/demos/context/DualContext.java
+++ b/src/demos/context/DualContext.java
@@ -65,6 +65,7 @@ import javax.swing.JFrame;
using the GLDrawable.swapBuffers() API. */
public class DualContext extends Canvas {
+
private GLDrawable drawable;
private GLContext context1;
private GLContext context2;
@@ -75,11 +76,11 @@ public class DualContext extends Canvas {
public DualContext(GLCapabilities capabilities) {
super(unwrap((AWTGraphicsConfiguration)
GLDrawableFactory.getFactory().chooseGraphicsConfiguration(capabilities, null, null)));
- drawable = GLDrawableFactory.getFactory().getGLDrawable(this, capabilities, null);
+ drawable = GLDrawableFactory.getFactory().createGLDrawable(this, capabilities, null);
context1 = drawable.createContext(null);
context2 = drawable.createContext(null);
glu = new GLU();
- glut = new GLUT();
+ glut = new GLUTgl2();
}
public void addNotify() {
@@ -131,12 +132,12 @@ public class DualContext extends Canvas {
gl.glEnable(GL.GL_SCISSOR_TEST);
gl.glClearColor(br, bg, bb, 1);
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
- float length = glut.glutStrokeLengthf(GLUT.STROKE_ROMAN, str);
+ float length = glut.glutStrokeLengthf(GLUTgl2.STROKE_ROMAN, str);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluOrtho2D(x, x + width, y, y + height);
gl.glTranslatef(x + (width - length) / 2, y + height / 2, 0);
- glut.glutStrokeString(GLUT.STROKE_ROMAN, str);
+ glut.glutStrokeString(GLUTgl2.STROKE_ROMAN, str);
}
public static void main(String[] args) {