aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2001-12-06 09:18:00 +0000
committerSven Gothel <[email protected]>2001-12-06 09:18:00 +0000
commit8fdc4baaee82a63247a9f4203dace4ee910881bb (patch)
treef9ff045a8756d695c3afafadb5256c86813eecef /demos
parent5a67c0f5302dbd445d744450db58d1122096b742 (diff)
2.8.1 rc 0rel-2-8-1-0-rc
Diffstat (limited to 'demos')
-rw-r--r--demos/GLFDemos/glf3dtext2.java-not-finished378
-rw-r--r--demos/GLFDemos/index.html4
-rw-r--r--demos/GLFDemos/index_plugin13.html4
-rw-r--r--demos/HodglimsNeHe/index.html2
-rw-r--r--demos/HodglimsNeHe/index_plugin13.html2
-rw-r--r--demos/MiscDemos/gearRenderer.java348
-rw-r--r--demos/MiscDemos/gears.java340
-rw-r--r--demos/MiscDemos/gearsFullScreen.java215
-rw-r--r--demos/MiscDemos/gearsOffScreen2Tga.java114
-rw-r--r--demos/MiscDemos/gearsOffScreenDrawImage.html13
-rwxr-xr-xdemos/MiscDemos/gearsOffScreenDrawImage.java167
-rw-r--r--demos/MiscDemos/gearsOffScreenDrawImage_plugin13.html45
-rw-r--r--demos/MiscDemos/index.html4
-rw-r--r--demos/MiscDemos/index_plugin13.html4
-rw-r--r--demos/MiscDemos/makefile65
-rwxr-xr-xdemos/MiscDemos/morph3d.java5
-rwxr-xr-xdemos/index.html54
-rw-r--r--demos/makefile5
18 files changed, 1391 insertions, 378 deletions
diff --git a/demos/GLFDemos/glf3dtext2.java-not-finished b/demos/GLFDemos/glf3dtext2.java-not-finished
new file mode 100644
index 0000000..9efb0bf
--- /dev/null
+++ b/demos/GLFDemos/glf3dtext2.java-not-finished
@@ -0,0 +1,378 @@
+
+import gl4java.*;
+import gl4java.drawable.*;
+import gl4java.awt.GLAnimCanvas;
+import gl4java.applet.SimpleGLAnimApplet1;
+import gl4java.utils.textures.*;
+import gl4java.utils.glf.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.applet.*;
+import java.net.*;
+
+public class glf3dtext2 extends SimpleGLAnimApplet1
+{
+ public void init()
+ {
+ super.init();
+ GLContext.gljNativeDebug = false;
+ GLContext.gljClassDebug = false;
+
+ Dimension d = getSize();
+
+ GLCapabilities caps = new GLCapabilities();
+
+ canvas =
+ GLDrawableFactory.getFactory().createGLAnimCanvas(caps, d.width, d.height);
+
+ glf3dtextRenderer renderer = new glf3dtextRenderer();
+ canvas.addGLEventListener(renderer);
+
+ add("Center", canvas);
+ addMouseListener(this);
+ }
+
+ public static void main( String args[] )
+ {
+ Frame mainFrame = new Frame("font test 2");
+
+ glf3dtext2 applet = new glf3dtext2();
+
+ applet.setSize(400, 400);
+ applet.init();
+ applet.start();
+
+ mainFrame.add(applet);
+
+ mainFrame.pack();
+ mainFrame.setVisible(true);
+ }
+
+ class glf3dtextRenderer
+ implements GLEventListener, MouseListener,MouseMotionListener
+ {
+ float []mPosObjTrans;
+ float []mPosObjRot;
+
+ Point mousePoint;
+ Point oldMousePoint;
+ boolean mouseMoveFlag;
+
+ private GLFunc gl;
+ private GLUFunc glu;
+ private GLContext glj;
+
+ protected GLF glf = null;
+
+ int fArial1 = 0;
+ int fArialBMF = 0;
+
+ int fTechno1 = 0;
+ int fTechnoBMF = 0;
+
+ int fTimesNew1 = 0;
+ int fTimesNewBMF = 0;
+
+ float angle=0f;
+
+ public glf3dtextRenderer ()
+ {
+ super();
+ }
+
+ public void init(GLDrawable drawable)
+ {
+ gl = drawable.getGL();
+ glu = drawable.getGLU();
+ glj = drawable.getGLContext();
+
+ glf = new GLF();
+
+ glf.glfInit();
+
+ fArial1 = glf.glfLoadFont("arial1.glf");
+ fArialBMF = glf.glfLoadBMFFont("arial.bmf");
+
+ fTechno1 = glf.glfLoadFont("techno1.glf");
+ fTechnoBMF = glf.glfLoadBMFFont("techno.bmf");
+
+ fTimesNew1 = glf.glfLoadFont("times_new1.glf");
+ fTimesNewBMF = glf.glfLoadBMFFont("times_new.bmf");
+
+ // cameraMatrix init
+ mPosObjTrans=new float[16];
+ for(int i=0;i<16;i++)
+ mPosObjTrans[i]=0f;
+ mPosObjTrans[0]=mPosObjTrans[5]=mPosObjTrans[10]=mPosObjTrans[15]=1f;
+
+ mPosObjRot=new float[16];
+ for(int i=0;i<16;i++)
+ mPosObjRot[i]=0f;
+ mPosObjRot[0]=mPosObjRot[5]=mPosObjRot[10]=mPosObjRot[15]=1f;
+
+ TranlateObj(0f,0f,-10f);
+
+ gl.glShadeModel (GL_SMOOTH);
+ gl.glEnable(GL_DEPTH_TEST);
+
+ gl.glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
+ gl.glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ glj.gljCheckGL();
+
+ canvas.addMouseListener(this);
+ canvas.addMouseMotionListener(this);
+ mouseMoveFlag=false;
+ }
+
+ public void cleanup(GLDrawable drawable)
+ {
+ System.out.println("destroy(): " + this);
+ removeMouseListener(this);
+ removeMouseMotionListener(this);
+ glf.glfClose();
+ }
+
+ public void display(GLDrawable drawable)
+ {
+ int i;
+
+ // just render it
+ gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ SetCamera();
+
+ DrawScene();
+
+ glj.gljCheckGL();
+ }
+
+ public void preDisplay(GLDrawable drawable)
+ {
+ }
+
+ public void postDisplay(GLDrawable drawable)
+ {
+ }
+
+ public void reshape(gl4java.drawable.GLDrawable gld,int width,int height)
+ {
+ gl.glMatrixMode (GL_MODELVIEW);
+ gl.glViewport (0, 0, width, height);
+ gl.glLoadIdentity();
+ SetCamera();
+ }
+
+
+ public void drawGrid(float x0, float y0,
+ float width, float height, float step)
+ {
+ float i,j;
+
+ /* draw grid */
+ gl.glBegin(GL_LINES);
+ for(i=x0;i<width;i+=step)
+ for(j=y0;j<height;j+=step)
+ {
+ if(i==0f && j==0f)
+ gl.glColor3f (1f,0f,0f);
+ else
+ gl.glColor3f (0.6f,0.5f,0.5f);
+ gl.glVertex2f(0f,j);
+ gl.glVertex2f(width,j);
+ gl.glVertex2f(i,height);
+ gl.glVertex2f(i,0f);
+ }
+ gl.glEnd();
+ }
+
+ void DrawScene()
+ {
+ gl.glMatrixMode (GL_MODELVIEW);
+ gl.glLoadIdentity ();
+
+ // kamera setzen
+ gl.glLoadMatrixf(mPosObjTrans);
+ gl.glMultMatrixf(mPosObjRot);
+
+ gl.glPushMatrix();
+ drawGrid(0f, 0f, 10f, 10f, 0.5f);
+ gl.glPopMatrix();
+
+ // obj zeichnen
+ gl.glPushMatrix();
+ gl.glColor3d(0.3,0,0);
+
+ gl.glBegin(GL_POLYGON);
+ gl.glVertex2d(0,-0.5);
+ gl.glVertex2d(0.5,0.5);
+ gl.glVertex2d(-0.5,0.5);
+ gl.glEnd();
+
+ gl.glColor3d(1,1,1);
+ gl.glPopMatrix();
+
+ gl.glPushMatrix();
+ gl.glRotatef(angle, 1, 1, 1);
+ angle += 3f;
+ if (angle > 359f) angle = angle - 360f;
+
+ gl.glScalef(0.5f, 0.5f, 0.5f);
+ gl.glTranslatef(-2.2f,-4f,0.5f);
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DWiredStringF(fArial1, "Arial - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DSolidStringF(fArial1, "Arial - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DWiredStringF(fTechno1, "Techno - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DSolidStringF(fTechno1, "Techno - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DWiredStringF(fTimesNew1, "TimesNew - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfDraw3DSolidStringF(fTimesNew1, "TimesNew - GLF 3D Text");
+
+ gl.glTranslatef(0f,2f,0f);
+ glf.glfSetCurrentBMFFont(fArialBMF);
+ glf.glfStartBitmapDrawing();
+ glf.glfDrawBString("Arial BMF - GLF 3D Text");
+ glf.glfStopBitmapDrawing();
+
+ gl.glTranslatef(0f, 2f, 0f);
+ glf.glfSetCurrentBMFFont(fTechnoBMF);
+ glf.glfStartBitmapDrawing();
+ glf.glfDrawBString("Techno BMF - GLF 3D Text");
+ glf.glfStopBitmapDrawing();
+
+ gl.glTranslatef(0f, 2f, 0f);
+ glf.glfSetCurrentBMFFont(fTimesNewBMF);
+ glf.glfStartBitmapDrawing();
+ glf.glfDrawBString("TimesNew BMF - GLF 3D Text");
+ glf.glfStopBitmapDrawing();
+
+ gl.glPopMatrix();
+ }
+
+ void SetCamera()
+ {
+ Dimension dim=getSize();
+ float aspect=(float)dim.width/(float)dim.height;
+
+ gl.glMatrixMode (GL_PROJECTION);
+ gl.glLoadIdentity ();
+ glu.gluPerspective(60f,aspect,.01,100);
+ }
+
+ void RotateObj(float degree,
+ float axisX,
+ float axisY,
+ float axisZ)
+ {
+ gl.glMatrixMode (GL_MODELVIEW);
+ gl.glLoadIdentity ();
+
+ // kamera setzen
+ gl.glRotatef(degree,axisX,axisY,axisZ);
+ gl.glMultMatrixf(mPosObjRot);
+ gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjRot);
+ }
+
+ void TranlateObj(float x,float y,float z)
+ {
+ gl.glMatrixMode (GL_MODELVIEW);
+ gl.glLoadIdentity ();
+
+ // kamera setzen
+ gl.glLoadMatrixf(mPosObjTrans);
+ gl.glTranslatef(x,y,z);
+ gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjTrans);
+ }
+
+ // entfernt rotationen aus aktueller matrix
+ double Billboard()
+ {
+ float[] mat=new float[16];
+
+ gl.glGetFloatv(GL_MODELVIEW_MATRIX,mat);
+ mat[0] = mat[5] = mat[10] = 1;
+ mat[1] = mat[2] = mat[4] = mat[6] = mat[8] = mat[9] = 0;
+ gl.glLoadMatrixf(mat);
+
+ return mat[14];
+ }
+
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered( MouseEvent evt )
+ {
+ }
+
+ public void mouseExited( MouseEvent evt )
+ {
+ }
+
+ public void mousePressed( MouseEvent evt )
+ {
+ if(mouseMoveFlag==false)
+ { // start drag
+ mouseMoveFlag=true;
+ mousePoint=evt.getPoint();
+ }
+ }
+
+ public void mouseReleased( MouseEvent evt )
+ {
+ mouseMoveFlag=false;
+ }
+
+ public void mouseClicked( MouseEvent evt )
+ {
+ Component comp = evt.getComponent();
+ }
+
+ public void mouseDragged(MouseEvent e)
+ {
+ if(mouseMoveFlag==true)
+ {
+ oldMousePoint=new Point(mousePoint);
+ mousePoint=e.getPoint();
+
+ Point dif=new Point(mousePoint.x-oldMousePoint.x,
+ mousePoint.y-oldMousePoint.y);
+
+ if( glj.gljMakeCurrent() == false )
+ {
+ System.out.println("problem in use() method");
+ return;
+ }
+
+ if(e.isShiftDown()==true)
+ TranlateObj((float)dif.x/6.0f,(float)dif.y/-6.0f,0f);
+ else if(e.isAltDown()==true)
+ {
+ TranlateObj(0f,0f,(float)dif.y/6.0f);
+ RotateObj(dif.x,0f,0f,1f);
+ }
+ else
+ {
+ RotateObj(dif.x,0f,1f,0f);
+ RotateObj(dif.y,1f,0f,0f);
+ }
+
+ glj.gljFree();
+
+ repaint();
+
+ }
+ }
+ public void mouseMoved(MouseEvent e)
+ {
+ }
+
+
+ }
+}
diff --git a/demos/GLFDemos/index.html b/demos/GLFDemos/index.html
index 3b014e2..c2c93c4 100644
--- a/demos/GLFDemos/index.html
+++ b/demos/GLFDemos/index.html
@@ -7,7 +7,7 @@
<title>Misc Demos</title>
</head>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
-<p>Here are the GLF-Demos for <B> GL4Java >= 2.7.2.0: </B> <br>
+<p>Here are the GLF-Demos for <B> GL4Java >= 2.8.1.0: </B> <br>
<br>
<p><a href="index_plugin13.html">To use the Java2 Plug-In (Java2, JRE, Plug-In 1.3), click here !</a><br>
<br>
@@ -15,8 +15,6 @@
<br>
<p>&nbsp;<a href="glf3dtext.html">GLF Font Demo 1</a>
: GLF Font Demo 1 (GLF DEMO)
-<p>&nbsp;<a href="glf3dtext2.html">GLF Font Demo 2</a>
-: GLF Font Demo 2 with rotation (GLF DEMO)
<br>&nbsp;
<br>
<br>
diff --git a/demos/GLFDemos/index_plugin13.html b/demos/GLFDemos/index_plugin13.html
index deb60a6..460859f 100644
--- a/demos/GLFDemos/index_plugin13.html
+++ b/demos/GLFDemos/index_plugin13.html
@@ -7,7 +7,7 @@
<title>Misc Demos</title>
</head>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
-<p>Here are the GLF Demos for <B> GL4Java >= 2.7.2.0: & Java2 Plug-In 1.3</B>
+<p>Here are the GLF Demos for <B> GL4Java >= 2.8.1.0: & Java2 Plug-In 1.3</B>
<hr
<br>&nbsp;
<a href="../../Installer/java.policy">The Java2 (sdk, jre, plugin 1.3) policy file example to give GL4Java the necessary permissions (Click here) !</a>
@@ -17,8 +17,6 @@
<br>
<p>&nbsp;<a href="glf3dtext_plugin13.html">GLF Font Demo 1</a>
: GLF Font Demo 1 (GLF DEMO)
-<p>&nbsp;<a href="glf3dtext2_plugin13.html">GLF Font Demo 2</a>
-: GLF Font Demo 2 with rotation (GLF DEMO)
<br>&nbsp;
<br>
<br>
diff --git a/demos/HodglimsNeHe/index.html b/demos/HodglimsNeHe/index.html
index 89c5cf7..6c0aaa2 100644
--- a/demos/HodglimsNeHe/index.html
+++ b/demos/HodglimsNeHe/index.html
@@ -11,7 +11,7 @@
<a href="http://nehe.gamedev.net/opengl.asp">NeHe OpenGL Tutorial Demos</a>
originally ported by
<a href="http://dev.knowledgeassociates.com/Hodglim/nehe/nehe.shtml">Hodglim</a>
-for <B> GL4Java >= 2.6.0.0: </B> <br>
+for <B> GL4Java >= 2.8.1.0: </B> <br>
<br>
This demos have added <I>requestFocus()</I> statements,
especially for the events: <I>mouseEntered</I> and <I>mouseClicked</I> !<br>
diff --git a/demos/HodglimsNeHe/index_plugin13.html b/demos/HodglimsNeHe/index_plugin13.html
index e3d74ab..741ae99 100644
--- a/demos/HodglimsNeHe/index_plugin13.html
+++ b/demos/HodglimsNeHe/index_plugin13.html
@@ -11,7 +11,7 @@
<a href="http://nehe.gamedev.net/opengl.asp">NeHe OpenGL Tutorial Demos</a>
originally ported by
<a href="http://dev.knowledgeassociates.com/Hodglim/nehe/nehe.shtml">Hodglim</a>
-for <B> GL4Java >= 2.6.0.0: </B> <br>
+for <B> GL4Java >= 2.8.1.0: </B> <br>
<br>
This demos have added <I>requestFocus()</I> statements,
especially for the events: <I>mouseEntered</I> and <I>mouseClicked</I> !<br>
diff --git a/demos/MiscDemos/gearRenderer.java b/demos/MiscDemos/gearRenderer.java
new file mode 100644
index 0000000..345790a
--- /dev/null
+++ b/demos/MiscDemos/gearRenderer.java
@@ -0,0 +1,348 @@
+/**
+ * @(#) gears.java
+ * @(#) author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.*;
+import java.util.*;
+import java.io.*;
+import gl4java.*;
+import gl4java.awt.*;
+import gl4java.drawable.*;
+
+/* Local GLAnimCanvas extension class */
+
+public class gearRenderer
+ implements GLEventListener, MouseListener, MouseMotionListener
+{
+ private static final float M_PI = 3.14159265f;
+
+ private long T0 = 0;
+ private long Frames = 0;
+
+ private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+ private int gear1, gear2, gear3;
+ private float angle = 0.0f;
+
+ private int prevMouseX, prevMouseY;
+ private boolean mouseRButtonDown = false;
+
+ private boolean showGL = false;
+
+ private GLFunc gl;
+ private GLUFunc glu;
+ private GLContext glj;
+ private GLDrawable gldrawable;
+
+ public gearRenderer(boolean showGL)
+ {
+ this.showGL=showGL;
+ }
+
+ public void init(GLDrawable drawable)
+ {
+ gl = drawable.getGL();
+ glu = drawable.getGLU();
+ glj = drawable.getGLContext();
+ this.gldrawable = drawable;
+
+ float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
+ float red[] = { 0.8f, 0.1f, 0.0f, 1.0f };
+ float green[] = { 0.0f, 0.8f, 0.2f, 1.0f };
+ float blue[] = { 0.2f, 0.2f, 1.0f, 1.0f };
+
+ gl.glLightfv(GL_LIGHT0, GL_POSITION, pos);
+ gl.glEnable(GL_CULL_FACE);
+ gl.glEnable(GL_LIGHTING);
+ gl.glEnable(GL_LIGHT0);
+ gl.glEnable(GL_DEPTH_TEST);
+
+ /* make the gears */
+ gear1 = gl.glGenLists(1);
+ gl.glNewList(gear1, GL_COMPILE);
+ gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
+ gear(1.0f, 4.0f, 1.0f, 20, 0.7f);
+ gl.glEndList();
+
+ gear2 = gl.glGenLists(1);
+ gl.glNewList(gear2, GL_COMPILE);
+ gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
+ gear(0.5f, 2.0f, 2.0f, 10, 0.7f);
+ gl.glEndList();
+
+ gear3 = gl.glGenLists(1);
+ gl.glNewList(gear3, GL_COMPILE);
+ gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
+ gear(1.3f, 2.0f, 0.5f, 10, 0.7f);
+ gl.glEndList();
+
+ gl.glEnable(GL_NORMALIZE);
+
+ glj.gljCheckGL();
+
+ drawable.addMouseListener(this);
+ drawable.addMouseMotionListener(this);
+
+ T0=System.currentTimeMillis();
+ }
+
+ public void cleanup(GLDrawable drawable)
+ {
+ System.out.println("destroy(): " + this);
+ drawable.removeMouseListener(this);
+ drawable.removeMouseMotionListener(this);
+ }
+
+ public void reshape(gl4java.drawable.GLDrawable gld,int width,int height)
+ {
+ float h = (float)height / (float)width;
+
+ gl.glViewport(0,0,width,height);
+ gl.glMatrixMode(GL_PROJECTION);
+ gl.glLoadIdentity();
+ gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+ gl.glMatrixMode(GL_MODELVIEW);
+ gl.glLoadIdentity();
+ gl.glTranslatef(0.0f, 0.0f, -40.0f);
+ }
+
+ public void display(GLDrawable drawable)
+ {
+ if(showGL)
+ {
+ showGL=false;
+ System.out.println("GL VERSION : "+gl.glGetString(GL_VERSION));
+ System.out.println("GL RENDERER: "+gl.glGetString(GL_RENDERER));
+ System.out.println("GL VENDOR : "+gl.glGetString(GL_VENDOR));
+ }
+
+ angle += 2.0f;
+
+ gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ gl.glPushMatrix();
+ gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.0f, -2.0f, 0.0f);
+ gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear1);
+ gl.glPopMatrix();
+
+ gl.glPushMatrix();
+ gl.glTranslatef(3.1f, -2.0f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear2);
+ gl.glPopMatrix();
+
+ gl.glPushMatrix();
+ gl.glTranslatef(-3.1f, 4.2f, 0.0f);
+ gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+ gl.glCallList(gear3);
+ gl.glPopMatrix();
+
+ gl.glPopMatrix();
+
+ Frames++;
+ }
+
+ public void preDisplay(GLDrawable drawable)
+ {
+ }
+
+ public void postDisplay(GLDrawable drawable)
+ {
+ long t=System.currentTimeMillis();
+ if(t - T0 >= 5000)
+ {
+ double seconds = (double)(t - T0) / 1000.0;
+ double fps = (double)Frames / seconds;
+ System.out.println(Frames+" frames in "+seconds+" seconds = "+
+ fps+" FPS");
+ T0 = t;
+ Frames = 0;
+ }
+ }
+
+ private void gear
+ (float inner_radius,
+ float outer_radius,
+ float width,
+ int teeth,
+ float tooth_depth)
+ {
+ int i;
+ float r0, r1, r2;
+ float angle, da;
+ float u, v, len;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+
+ da = 2.0f * M_PI / teeth / 4.0f;
+
+ gl.glShadeModel(GL_FLAT);
+
+ gl.glNormal3f(0.0f, 0.0f, 1.0f);
+
+ /* draw front face */
+ gl.glBegin(GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ if(i < teeth)
+ {
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ }
+ gl.glEnd();
+
+ /* draw front sides of teeth */
+ gl.glBegin(GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back face */
+ gl.glBegin(GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw back sides of teeth */
+ gl.glBegin(GL_QUADS);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ }
+ gl.glEnd();
+
+ /* draw outward faces of teeth */
+ gl.glBegin(GL_QUAD_STRIP);
+ for (i = 0; i < teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+ u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
+ v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
+ len = (float)Math.sqrt(u * u + v * v);
+ u /= len;
+ v /= len;
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
+ gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+ u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
+ v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
+ gl.glNormal3f(v, -u, 0.0f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+ gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+ }
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
+ gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
+ gl.glEnd();
+
+ gl.glShadeModel(GL_SMOOTH);
+
+ /* draw inside radius cylinder */
+ gl.glBegin(GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++)
+ {
+ angle = i * 2.0f * M_PI / teeth;
+ gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+ gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+ }
+ gl.glEnd();
+ }
+
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered( MouseEvent evt )
+ {
+ //System.out.println("mouse entered cvs: ");
+ }
+
+ public void mouseExited( MouseEvent evt )
+ {
+ //System.out.println("mouse exit cvs: ");
+ }
+
+ public void mousePressed( MouseEvent evt )
+ {
+ //System.out.println("mouse pressed cvs: ");
+ prevMouseX = evt.getX();
+ prevMouseY = evt.getY();
+ if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
+ {
+ mouseRButtonDown = true;
+ }
+ }
+
+ public void mouseReleased( MouseEvent evt )
+ {
+ //System.out.println("mouse released cvs: ");
+ if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
+ {
+ mouseRButtonDown = false;
+ }
+ }
+
+ public void mouseClicked( MouseEvent evt )
+ {
+ //System.out.println("mouse clicked cvs: ");
+ }
+
+ // Methods required for the implementation of MouseMotionListener
+ public void mouseDragged( MouseEvent evt )
+ {
+ //System.out.println("mouse dragged: ");
+ int x = evt.getX();
+ int y = evt.getY();
+ Dimension size = gldrawable.getSize();
+
+ float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
+ float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);
+
+ prevMouseX = x;
+ prevMouseY = y;
+
+ view_rotx += thetaX;
+ view_roty += thetaY;
+
+ }
+
+ public void mouseMoved( MouseEvent evt )
+ {
+ //System.out.println("mouse moved: ");
+ }
+}
diff --git a/demos/MiscDemos/gears.java b/demos/MiscDemos/gears.java
index dd4cb13..c33ff7c 100644
--- a/demos/MiscDemos/gears.java
+++ b/demos/MiscDemos/gears.java
@@ -11,7 +11,6 @@ import java.awt.event.*;
import java.lang.*;
import java.util.*;
import java.io.*;
-import java.util.*;
import gl4java.*;
import gl4java.drawable.*;
import gl4java.awt.GLAnimCanvas;
@@ -45,6 +44,12 @@ public class gears extends SimpleGLAnimApplet1
addMouseListener(this);
}
+ public void destroy()
+ {
+ removeMouseListener(this);
+ super.destroy();
+ }
+
public static void main( String args[] )
{
int i = 0;
@@ -188,337 +193,4 @@ public class gears extends SimpleGLAnimApplet1
start();
}
}
-
-
- /* Local GLAnimCanvas extension class */
-
-
- public class gearRenderer implements GLEventListener, MouseListener, MouseMotionListener
- {
- private static final float M_PI = 3.14159265f;
-
- private long T0 = 0;
- private long Frames = 0;
-
- private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
- private int gear1, gear2, gear3;
- private float angle = 0.0f;
-
- private int prevMouseX, prevMouseY;
- private boolean mouseRButtonDown = false;
-
- private boolean showGL = false;
-
- private GLFunc gl;
- private GLUFunc glu;
- private GLContext glj;
-
- public gearRenderer(boolean showGL)
- {
- this.showGL=showGL;
- }
-
- public void init(GLDrawable drawable)
- {
- gl = drawable.getGL();
- glu = drawable.getGLU();
- glj = drawable.getGLContext();
-
- float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
- float red[] = { 0.8f, 0.1f, 0.0f, 1.0f };
- float green[] = { 0.0f, 0.8f, 0.2f, 1.0f };
- float blue[] = { 0.2f, 0.2f, 1.0f, 1.0f };
-
- gl.glLightfv(GL_LIGHT0, GL_POSITION, pos);
- gl.glEnable(GL_CULL_FACE);
- gl.glEnable(GL_LIGHTING);
- gl.glEnable(GL_LIGHT0);
- gl.glEnable(GL_DEPTH_TEST);
-
- /* make the gears */
- gear1 = gl.glGenLists(1);
- gl.glNewList(gear1, GL_COMPILE);
- gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
- gear(1.0f, 4.0f, 1.0f, 20, 0.7f);
- gl.glEndList();
-
- gear2 = gl.glGenLists(1);
- gl.glNewList(gear2, GL_COMPILE);
- gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
- gear(0.5f, 2.0f, 2.0f, 10, 0.7f);
- gl.glEndList();
-
- gear3 = gl.glGenLists(1);
- gl.glNewList(gear3, GL_COMPILE);
- gl.glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
- gear(1.3f, 2.0f, 0.5f, 10, 0.7f);
- gl.glEndList();
-
- gl.glEnable(GL_NORMALIZE);
-
- glj.gljCheckGL();
-
- drawable.addMouseListener(this);
- drawable.addMouseMotionListener(this);
-
- T0=System.currentTimeMillis();
- System.out.println("init ..");
- }
-
- public void cleanup(GLDrawable drawable)
- {
- System.out.println("destroy(): " + this);
- removeMouseListener(this);
- removeMouseMotionListener(this);
- }
-
- public void reshape(gl4java.drawable.GLDrawable gld,int width,int height)
- {
- float h = (float)height / (float)width;
-
- gl.glViewport(0,0,width,height);
- gl.glMatrixMode(GL_PROJECTION);
- gl.glLoadIdentity();
- gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
- gl.glMatrixMode(GL_MODELVIEW);
- gl.glLoadIdentity();
- gl.glTranslatef(0.0f, 0.0f, -40.0f);
- }
-
- public void display(GLDrawable drawable)
- {
- if(showGL)
- {
- showGL=false;
- System.out.println("GL VERSION : "+gl.glGetString(GL_VERSION));
- System.out.println("GL RENDERER: "+gl.glGetString(GL_RENDERER));
- System.out.println("GL VENDOR : "+gl.glGetString(GL_VENDOR));
- }
-
- angle += 2.0f;
-
- gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- gl.glPushMatrix();
- gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
- gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
- gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
-
- gl.glPushMatrix();
- gl.glTranslatef(-3.0f, -2.0f, 0.0f);
- gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
- gl.glCallList(gear1);
- gl.glPopMatrix();
-
- gl.glPushMatrix();
- gl.glTranslatef(3.1f, -2.0f, 0.0f);
- gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
- gl.glCallList(gear2);
- gl.glPopMatrix();
-
- gl.glPushMatrix();
- gl.glTranslatef(-3.1f, 4.2f, 0.0f);
- gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
- gl.glCallList(gear3);
- gl.glPopMatrix();
-
- gl.glPopMatrix();
-
- Frames++;
- }
-
- public void preDisplay(GLDrawable drawable)
- {
- }
-
- public void postDisplay(GLDrawable drawable)
- {
- long t=System.currentTimeMillis();
- if(t - T0 >= 5000)
- {
- double seconds = (double)(t - T0) / 1000.0;
- double fps = (double)Frames / seconds;
- System.out.println(Frames+" frames in "+seconds+" seconds = "+
- fps+" FPS");
- T0 = t;
- Frames = 0;
- }
- }
-
- private void gear
- (float inner_radius,
- float outer_radius,
- float width,
- int teeth,
- float tooth_depth)
- {
- int i;
- float r0, r1, r2;
- float angle, da;
- float u, v, len;
-
- r0 = inner_radius;
- r1 = outer_radius - tooth_depth / 2.0f;
- r2 = outer_radius + tooth_depth / 2.0f;
-
- da = 2.0f * M_PI / teeth / 4.0f;
-
- gl.glShadeModel(GL_FLAT);
-
- gl.glNormal3f(0.0f, 0.0f, 1.0f);
-
- /* draw front face */
- gl.glBegin(GL_QUAD_STRIP);
- for (i = 0; i <= teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
- if(i < teeth)
- {
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
- }
- }
- gl.glEnd();
-
- /* draw front sides of teeth */
- gl.glBegin(GL_QUADS);
- for (i = 0; i < teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
- }
- gl.glEnd();
-
- /* draw back face */
- gl.glBegin(GL_QUAD_STRIP);
- for (i = 0; i <= teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
- }
- gl.glEnd();
-
- /* draw back sides of teeth */
- gl.glBegin(GL_QUADS);
- for (i = 0; i < teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
- }
- gl.glEnd();
-
- /* draw outward faces of teeth */
- gl.glBegin(GL_QUAD_STRIP);
- for (i = 0; i < teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
- u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
- v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
- len = (float)Math.sqrt(u * u + v * v);
- u /= len;
- v /= len;
- gl.glNormal3f(v, -u, 0.0f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
- gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
- gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
- u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
- v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
- gl.glNormal3f(v, -u, 0.0f);
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
- gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
- }
- gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
- gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
- gl.glEnd();
-
- gl.glShadeModel(GL_SMOOTH);
-
- /* draw inside radius cylinder */
- gl.glBegin(GL_QUAD_STRIP);
- for (i = 0; i <= teeth; i++)
- {
- angle = i * 2.0f * M_PI / teeth;
- gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
- gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
- }
- gl.glEnd();
- }
-
- // Methods required for the implementation of MouseListener
- public void mouseEntered( MouseEvent evt )
- {
- //System.out.println("mouse entered cvs: ");
- }
-
- public void mouseExited( MouseEvent evt )
- {
- //System.out.println("mouse exit cvs: ");
- }
-
- public void mousePressed( MouseEvent evt )
- {
- //System.out.println("mouse pressed cvs: ");
- prevMouseX = evt.getX();
- prevMouseY = evt.getY();
- if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
- {
- mouseRButtonDown = true;
- }
- }
-
- public void mouseReleased( MouseEvent evt )
- {
- //System.out.println("mouse released cvs: ");
- if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0)
- {
- mouseRButtonDown = false;
- }
- }
-
- public void mouseClicked( MouseEvent evt )
- {
- //System.out.println("mouse clicked cvs: ");
- }
-
- // Methods required for the implementation of MouseMotionListener
- public void mouseDragged( MouseEvent evt )
- {
- //System.out.println("mouse dragged: ");
- int x = evt.getX();
- int y = evt.getY();
- Dimension size = getSize();
-
- float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
- float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);
-
- prevMouseX = x;
- prevMouseY = y;
-
- view_rotx += thetaX;
- view_roty += thetaY;
-
- }
-
- public void mouseMoved( MouseEvent evt )
- {
- //System.out.println("mouse moved: ");
- }
- }
}
diff --git a/demos/MiscDemos/gearsFullScreen.java b/demos/MiscDemos/gearsFullScreen.java
new file mode 100644
index 0000000..8cabd83
--- /dev/null
+++ b/demos/MiscDemos/gearsFullScreen.java
@@ -0,0 +1,215 @@
+/**
+ * @(#) gearsFullScreen.java
+ * @(#) author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+import java.applet.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.*;
+import java.util.*;
+import java.io.*;
+import gl4java.*;
+import gl4java.drawable.*;
+import gl4java.awt.GLAnimCanvas;
+import gl4java.applet.SimpleGLAnimApplet1;
+
+public class gearsFullScreen extends SimpleGLAnimApplet1
+ implements MouseListener
+{
+
+ /* Initialize the applet */
+ public void init()
+ {
+ init(false);
+ }
+
+ public void init(boolean showGL)
+ {
+ super.init();
+
+ Dimension d = getSize();
+
+ GLCapabilities caps = new GLCapabilities();
+
+ canvas =
+ GLDrawableFactory.getFactory().createGLAnimCanvas(caps, d.width, d.height);
+
+ gearRenderer gear = new gearRenderer(showGL);
+ canvas.addGLEventListener(gear);
+
+ add("Center", canvas);
+ addMouseListener(this);
+ }
+
+ public void destroy()
+ {
+ removeMouseListener(this);
+ super.destroy();
+ }
+
+
+ public static void main( String args[] )
+ {
+ int i = 0;
+ String gljLib = null;
+ String glLib = null;
+ String gluLib = null;
+ boolean perftest=false;
+
+ GLContext.gljNativeDebug = false;
+ GLContext.gljClassDebug = false;
+ GLContext.gljThreadDebug = false;
+
+ while(args.length>i)
+ {
+ if(args[i].equals("-perftest"))
+ {
+ perftest=true;
+ } else if(args[i].equals("-gljLib"))
+ {
+ i++;
+ if(args.length>i)
+ gljLib=args[i];
+ } else if(args[i].equals("-glLib"))
+ {
+ i++;
+ if(args.length>i)
+ glLib=args[i];
+ } else if(args[i].equals("-gluLib"))
+ {
+ i++;
+ if(args.length>i)
+ gluLib=args[i];
+ } else {
+ System.out.println("illegal arg "+i+": "+args[i]);
+ }
+ i++;
+ }
+
+ if(perftest)
+ {
+ GLContext.gljNativeDebug = false;
+ GLContext.gljThreadDebug = false;
+ GLContext.gljClassDebug = false;
+ }
+
+ if(perftest)
+ GLContext.gljClassDebug=true;
+ GLContext.doLoadNativeLibraries(gljLib, glLib, gluLib);
+ if(perftest)
+ GLContext.gljClassDebug=false;
+
+ GraphicsEnvironment env =
+ GraphicsEnvironment.getLocalGraphicsEnvironment();
+ GraphicsDevice device = env.getDefaultScreenDevice();
+ Frame mainFrame = null;
+
+ System.out.println("isFullScreenSupported: "+
+ device.isFullScreenSupported() );
+
+ try {
+ GraphicsConfiguration gc ;
+ gl4java.drawable.GLDrawableFactory df =
+ gl4java.drawable.GLDrawableFactory.getFactory();
+
+ if(df instanceof gl4java.drawable.SunJDK13GLDrawableFactory)
+ {
+ GLCapabilities glCaps = new GLCapabilities();
+ gl4java.drawable.SunJDK13GLDrawableFactory sdf =
+ (gl4java.drawable.SunJDK13GLDrawableFactory)df;
+
+ gc = sdf.getGraphicsConfiguration(glCaps, device);
+ } else {
+ gc = device.getDefaultConfiguration();
+ }
+
+ mainFrame = new Frame(gc);
+
+ gearsFullScreen applet = new gearsFullScreen();
+ mainFrame.add(applet);
+ applet.setSize(400,500);
+ applet.init();
+
+ if(perftest)
+ {
+ applet.canvas.setUseFpsSleep(false);
+ applet.canvas.setUseRepaint(false);
+ applet.canvas.setUseYield(false);
+
+ System.out.println("useFpsSleep: "+
+ applet.canvas.getUseFpsSleep());
+ System.out.println("useRepaint: "+
+ applet.canvas.getUseRepaint());
+
+ System.out.println("useFpsSleep: "+
+ applet.canvas.getUseFpsSleep());
+ }
+
+ applet.start();
+
+ Dimension ps = applet.getPreferredSize();
+ mainFrame.setBounds(-100,-100,99,99);
+ mainFrame.setVisible(true);
+ mainFrame.setVisible(false);
+ mainFrame.setVisible(true);
+ Insets is = mainFrame.getInsets();
+ mainFrame.setBounds(0,0,
+ ps.width+is.left+is.right,
+ ps.height+is.top+is.bottom);
+ mainFrame.setVisible(true);
+ Thread.currentThread().sleep(10000, 0 );
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ device.setFullScreenWindow(null);
+ }
+
+ }
+
+ // Methods required for the implementation of MouseListener
+ public void mouseEntered( MouseEvent evt )
+ {
+ //System.out.println("mouse entered: ");
+ super.mouseEntered(evt);
+ }
+
+ public void mouseExited( MouseEvent evt )
+ {
+ //System.out.println("mouse exit: ");
+ super.mouseExited(evt);
+ }
+
+ public void mousePressed( MouseEvent evt )
+ {
+ //System.out.println("mouse pressed: ");
+ super.mousePressed(evt);
+ }
+
+ public void mouseReleased( MouseEvent evt )
+ {
+ //System.out.println("mouse released: ");
+ super.mouseReleased(evt);
+ }
+
+ public void mouseClicked( MouseEvent evt )
+ {
+ //System.out.println("mouse clicked: ");
+ super.mouseClicked(evt);
+
+ if ((evt.getModifiers() & evt.BUTTON2_MASK) != 0)
+ {
+ System.out.println("stopping applet now .. (after 1s, restart)");
+ stop();
+ try {
+ Thread.sleep(1000);
+ } catch (Exception e)
+ { System.out.println("oops, somebody woke us up .."); }
+ System.out.println("restarting applet now .. ");
+ canvas.setVisible(true);
+ start();
+ }
+ }
+}
diff --git a/demos/MiscDemos/gearsOffScreen2Tga.java b/demos/MiscDemos/gearsOffScreen2Tga.java
new file mode 100644
index 0000000..21ed42f
--- /dev/null
+++ b/demos/MiscDemos/gearsOffScreen2Tga.java
@@ -0,0 +1,114 @@
+/**
+ * @(#) gearsOffScreen2Tga.java
+ * @(#) author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+import java.applet.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.*;
+import java.util.*;
+import java.io.*;
+import gl4java.*;
+import gl4java.drawable.*;
+import gl4java.awt.*;
+import gl4java.utils.textures.*;
+
+public class gearsOffScreen2Tga
+{
+ GLOffScreenDrawable canvas;
+
+ public void snapshot()
+ {
+ canvas = new GLOffScreenDrawable(new Dimension(400,400));
+
+ gearRenderer gear = new gearRenderer(true);
+ canvas.addGLEventListener(gear);
+
+ canvas.initDrawable();
+
+ if(canvas.cvsIsInit())
+ {
+ canvas.repaint();
+ GLContext glj = canvas.getGLContext();
+
+ if( glj.gljMakeCurrent() )
+ {
+ TGATextureGrabber textgrab =
+ new TGATextureGrabber(canvas.getGL());
+ textgrab.grabPixels(
+ glj.isDoubleBuffer()?GLEnum.GL_BACK:GLEnum.GL_FRONT,
+ 0, 0,
+ canvas.getSize().width,
+ canvas.getSize().height);
+ textgrab.write2File("gears.tga");
+ System.out.println("written gears.tga");
+ glj.gljCheckGL();
+ glj.gljFree();
+ }
+ }
+ }
+
+ public static void main( String args[] )
+ {
+ int i = 0;
+ String gljLib = null;
+ String glLib = null;
+ String gluLib = null;
+
+ GLContext.gljNativeDebug = false;
+ GLContext.gljClassDebug = false;
+ GLContext.gljThreadDebug = false;
+
+ while(args.length>i)
+ {
+ if(args[i].equals("-gljLib"))
+ {
+ i++;
+ if(args.length>i)
+ gljLib=args[i];
+ } else if(args[i].equals("-glLib"))
+ {
+ i++;
+ if(args.length>i)
+ glLib=args[i];
+ } else if(args[i].equals("-gluLib"))
+ {
+ i++;
+ if(args.length>i)
+ gluLib=args[i];
+ } else {
+ System.out.println("illegal arg "+i+": "+args[i]);
+ }
+ i++;
+ }
+
+ GLContext.doLoadNativeLibraries(gljLib, glLib, gluLib);
+
+ /**
+ * yes .. we need an AWT Frame,
+ * to let java get in touch with the underlying
+ * windowing system for initialisation !
+ */
+ Frame mainFrame = new Frame("gears offscreen");
+
+ Dimension ps = new Dimension(20,20);
+ mainFrame.setBounds(-100,-100,99,99);
+ mainFrame.setVisible(true);
+ mainFrame.setVisible(false);
+ mainFrame.setVisible(true);
+ Insets is = mainFrame.getInsets();
+ mainFrame.setBounds(0,0,
+ ps.width+is.left+is.right,
+ ps.height+is.top+is.bottom);
+ mainFrame.setVisible(true);
+
+ gearsOffScreen2Tga applet = new gearsOffScreen2Tga();
+ applet.snapshot();
+
+ mainFrame.dispose();
+ System.exit(0);
+ }
+}
diff --git a/demos/MiscDemos/gearsOffScreenDrawImage.html b/demos/MiscDemos/gearsOffScreenDrawImage.html
new file mode 100644
index 0000000..e41b2e2
--- /dev/null
+++ b/demos/MiscDemos/gearsOffScreenDrawImage.html
@@ -0,0 +1,13 @@
+<HTML>
+<HEAD>
+<TITLE>G&ouml;thel Hard- und Software Entwicklungen</TITLE>
+</HEAD>
+<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
+<hr>
+<applet code="gearsOffScreenDrawImage" width=550 height=400>
+<param name=frames value="55">
+</applet>
+<hr>
+</BODY>
+</HTML>
+
diff --git a/demos/MiscDemos/gearsOffScreenDrawImage.java b/demos/MiscDemos/gearsOffScreenDrawImage.java
new file mode 100755
index 0000000..9cdc8c2
--- /dev/null
+++ b/demos/MiscDemos/gearsOffScreenDrawImage.java
@@ -0,0 +1,167 @@
+/**
+ * @(#) gearsOffScreeneen2Tga.java
+ * @(#) author: Brian Paul (converted to Java by Ron Cemer and Sven Goethel)
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+import java.applet.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.*;
+import java.util.*;
+import java.io.*;
+import gl4java.*;
+import gl4java.drawable.*;
+import gl4java.awt.*;
+import gl4java.utils.textures.*;
+
+public class gearsOffScreenDrawImage extends Applet
+ implements ComponentListener
+{
+ GLOffScreenDrawable glcanvas=null;
+ Dimension size;
+
+ public void init()
+ {
+ if(glcanvas==null)
+ {
+ size = new Dimension(400,400);
+ glcanvas = new GLOffScreenDrawable(size);
+
+ gearRenderer gear = new gearRenderer(true);
+ glcanvas.addGLEventListener(gear);
+
+ glcanvas.initDrawable();
+ }
+ addComponentListener(this);
+ }
+
+ public void destroy()
+ {
+ removeComponentListener(this);
+ glcanvas.cvsDispose();
+ glcanvas=null;
+ super.destroy();
+ }
+
+ public Dimension getPreferredSize() {
+ return getMinimumSize();
+ }
+
+ public Dimension getMinimumSize() {
+ return size;
+ }
+
+ public void setSize(Dimension size) {
+ this.size=size;
+ super.setSize(size);
+ if(glcanvas!=null)
+ glcanvas.setSize(size);
+ }
+
+
+ public void paint(Graphics g)
+ {
+ size=getSize();
+ if(glcanvas!=null && glcanvas.cvsIsInit())
+ {
+ glcanvas.repaint();
+ glcanvas.drawImage(g, 0, 0, size.width, size.height, this);
+ }
+ }
+
+
+ public void componentResized(ComponentEvent e)
+ {
+ if(glcanvas!=null && glcanvas.cvsIsInit())
+ {
+ setSize(getSize());
+ }
+ }
+
+ public void componentMoved(ComponentEvent e)
+ {
+ }
+
+ public void componentShown(ComponentEvent e)
+ {
+ }
+
+ public void componentHidden(ComponentEvent e)
+ { }
+
+ public static void main( String args[] )
+ {
+ int i = 0;
+ String gljLib = null;
+ String glLib = null;
+ String gluLib = null;
+
+ GLContext.gljNativeDebug = false;
+ GLContext.gljClassDebug = false;
+ GLContext.gljThreadDebug = false;
+
+ while(args.length>i)
+ {
+ if(args[i].equals("-gljLib"))
+ {
+ i++;
+ if(args.length>i)
+ gljLib=args[i];
+ } else if(args[i].equals("-glLib"))
+ {
+ i++;
+ if(args.length>i)
+ glLib=args[i];
+ } else if(args[i].equals("-gluLib"))
+ {
+ i++;
+ if(args.length>i)
+ gluLib=args[i];
+ } else {
+ System.out.println("illegal arg "+i+": "+args[i]);
+ }
+ i++;
+ }
+
+ GLContext.doLoadNativeLibraries(gljLib, glLib, gluLib);
+
+ /**
+ * yes .. we need an AWT Frame,
+ * to let java get in touch with the underlying
+ * windowing system for initialisation !
+ */
+ Frame mainFrame = new Frame("gears offscreen");
+
+ mainFrame.addWindowListener( new WindowAdapter()
+ {
+ public void windowClosed(WindowEvent e)
+ {
+ System.exit(0);
+ }
+ public void windowClosing(WindowEvent e)
+ {
+ windowClosed(e);
+ }
+ }
+ );
+
+ gearsOffScreenDrawImage applet = new gearsOffScreenDrawImage ();
+ mainFrame.add(applet);
+ applet.setSize(400,500);
+ applet.init();
+
+ Dimension ps = applet.getPreferredSize();
+ mainFrame.setBounds(-100,-100,99,99);
+ mainFrame.setVisible(true);
+ mainFrame.setVisible(false);
+ mainFrame.setVisible(true);
+ Insets is = mainFrame.getInsets();
+ mainFrame.setBounds(0,0,
+ ps.width+is.left+is.right,
+ ps.height+is.top+is.bottom);
+ mainFrame.setVisible(true);
+ applet.repaint();
+ }
+}
diff --git a/demos/MiscDemos/gearsOffScreenDrawImage_plugin13.html b/demos/MiscDemos/gearsOffScreenDrawImage_plugin13.html
new file mode 100644
index 0000000..3b472a5
--- /dev/null
+++ b/demos/MiscDemos/gearsOffScreenDrawImage_plugin13.html
@@ -0,0 +1,45 @@
+<HTML>
+<HEAD>
+<TITLE>G&ouml;thel Hard- und Software Entwicklungen</TITLE>
+</HEAD>
+<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
+<hr>
+<!--"CONVERTED_APPLET"-->
+<!-- CONVERTER VERSION 1.3 -->
+<SCRIPT LANGUAGE="JavaScript"><!--
+ var _info = navigator.userAgent; var _ns = false;
+ var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
+//--></SCRIPT>
+<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
+ var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
+//--></SCRIPT></COMMENT>
+
+<SCRIPT LANGUAGE="JavaScript"><!--
+ if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 550 HEIGHT = 400 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"><NOEMBED><XMP>');
+ else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.3" CODE = "gearsOffScreenDrawImage.class" WIDTH = 550 HEIGHT = 400 frames = "55" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED><XMP>');
+//--></SCRIPT>
+<APPLET CODE = "gearsOffScreenDrawImage.class" WIDTH = 550 HEIGHT = 400></XMP>
+<PARAM NAME = CODE VALUE = "gearsOffScreenDrawImage.class" >
+
+<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
+<PARAM NAME="scriptable" VALUE="false">
+<PARAM NAME = frames VALUE ="55">
+
+</APPLET>
+
+</NOEMBED></EMBED></OBJECT>
+
+
+<!--
+<APPLET CODE = "gearsOffScreenDrawImage.class" WIDTH = 550 HEIGHT = 400>
+<PARAM NAME = frames VALUE ="55">
+
+
+</APPLET>
+-->
+<!--"END_CONVERTED_APPLET"-->
+
+<hr>
+</BODY>
+</HTML>
+
diff --git a/demos/MiscDemos/index.html b/demos/MiscDemos/index.html
index bae1f0c..2147718 100644
--- a/demos/MiscDemos/index.html
+++ b/demos/MiscDemos/index.html
@@ -7,7 +7,7 @@
<title>Misc Demos</title>
</head>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
-<p>Here are the demos-II for <B> GL4Java >= 2.6.0.0: </B> <br>
+<p>Here are the demos-II for <B> GL4Java >= 2.8.1.0: </B> <br>
<br>
<p><a href="index_plugin13.html">To use the Java2 Plug-In (Java2, JRE, Plug-In 1.3), click here !</a><br>
<br>
@@ -27,6 +27,8 @@
: morph3d at 400x400
<p>&nbsp;<a href="gears.html">gears</a>
: gears at 400x400
+<p>&nbsp;<a href="gearsOffScreenDrawImage.html">gearsOffScreenDrawImage</a>
+: gears at 400x400
<p>&nbsp;<a href="GearsVS.html">GearsVS</a>
: GearsVS at 400x400
<br>&nbsp;
diff --git a/demos/MiscDemos/index_plugin13.html b/demos/MiscDemos/index_plugin13.html
index 9190be1..8acb31b 100644
--- a/demos/MiscDemos/index_plugin13.html
+++ b/demos/MiscDemos/index_plugin13.html
@@ -7,7 +7,7 @@
<title>Misc Demos</title>
</head>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
-<p>Here are the demos-II for <B> GL4Java >= 2.6.0.0: & Java2 Plug-In 1.3</B>
+<p>Here are the demos-II for <B> GL4Java >= 2.8.1.0: & Java2 Plug-In 1.3</B>
<hr>
<br>&nbsp;
<a href="../../Installer/java.policy">The Java2 (sdk, jre, plugin 1.3) policy file example to give GL4Java the necessary permissions (Click here) !</a>
@@ -29,6 +29,8 @@
: morph3d at 400x400
<p>&nbsp;<a href="gears_plugin13.html">gears</a>
: gears at 400x400
+<p>&nbsp;<a href="gearsOffScreenDrawImage_plugin13.html">gearsOffScreenDrawImage</a>
+: gears at 400x400
<p>&nbsp;<a href="GearsVS_plugin13.html">GearsVS</a>
: GearsVS at 400x400
<br>&nbsp;
diff --git a/demos/MiscDemos/makefile b/demos/MiscDemos/makefile
new file mode 100644
index 0000000..e7a1ae4
--- /dev/null
+++ b/demos/MiscDemos/makefile
@@ -0,0 +1,65 @@
+include ../../symbols.mak
+
+JAVA13_SOURCES = \
+ DrawColoredPrimitives.java \
+ DrawColoredPrimitives2.java \
+ GLImageViewerCanvas.java \
+ GLImageViewerWorld.java \
+ GLImageWorld1.java \
+ GearsVS.java \
+ SharedGLTest.java \
+ SharedGLTest2.java \
+ Test.java \
+ TestListener.java \
+ TriangleRotate.java \
+ accanti.java \
+ alpha3D.java \
+ anti.java \
+ coloredCross.java \
+ depthcue.java \
+ gearRenderer.java \
+ gears.java \
+ gearsOffScreen2Tga.java \
+ gearsOffScreenDrawImage.java \
+ glJavaFontTest1.java \
+ glutFontBitmapTest.java \
+ glutFontBitmapTest2Applet.java \
+ glutFontStrokeTest.java \
+ morph3d.java \
+ nurbs.java \
+ pngTextureTestApplet.java \
+ select.java \
+ spectex.java \
+ stencil.java \
+ teaambient.java \
+ teapots.java \
+ tess.java \
+ tessdemo.java \
+ tesswind.java \
+ jahuwaldt/gl/GLTools.java \
+ jahuwaldt/gl/Matrix.java \
+ jahuwaldt/gl/VirtualSphere.java
+
+JAVA13_CLASSES = ${JAVA13_SOURCES:.java=.class})
+
+ifdef JAVAC_14
+ JAVA14_SOURCES = \
+ gearsFullScreen.java
+ JAVA14_CLASSES = ${JAVA14_SOURCES:.java=.class})
+ HAVE_JAVAC_14 = 1
+else
+ JAVA14_SOURCES =
+ JAVA14_CLASSES =
+endif
+
+all: cleanup $(JAVA13_CLASSES) $(JAVA14_CLASSES)
+
+$(JAVA13_CLASSES) : $(JAVA13_SOURCES)
+ $(JAVAC_13) -O -deprecation $^ | tee -a errors
+
+$(JAVA14_CLASSES) : $(JAVA14_SOURCES)
+ $(JAVAC_14) -O -deprecation $^ | tee -a errors
+
+cleanup:
+ rm -f errors
+
diff --git a/demos/MiscDemos/morph3d.java b/demos/MiscDemos/morph3d.java
index 37a9663..9737ab6 100755
--- a/demos/MiscDemos/morph3d.java
+++ b/demos/MiscDemos/morph3d.java
@@ -199,8 +199,9 @@ public class morph3d extends SimpleGLAnimApplet1
}
);
- GLContext.gljNativeDebug = true;
- GLContext.gljClassDebug = true;
+ GLContext.gljNativeDebug = false;
+ GLContext.gljClassDebug = false;
+ GLContext.gljThreadDebug = false;
morph3d applet = new morph3d();
diff --git a/demos/index.html b/demos/index.html
index 6590948..1d9ed16 100755
--- a/demos/index.html
+++ b/demos/index.html
@@ -8,40 +8,40 @@
</head>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#e6e6ff">
<p>Here are the demos-I for <B>
-<A HREF="http://www.jausoft.com/gl4java/">GL4Java</A> >= 2.6.0.0: </B> <br>
+<A HREF="http://www.jausoft.com/gl4java/">GL4Java</A> >= 2.8.1.0: </B> <br>
<br>
- <LI><P ALIGN=LEFT><I><A HREF="glDemosCvs.html">glDemosCvs</A>
+ <LI><I><A HREF="glDemosCvs.html">glDemosCvs</A>
: Many OpenGL Canvas running together</I>
- </P>
- <LI><P ALIGN=LEFT><I><A HREF="glOlympicCvsApplet.html">glOlympicCvsApplet</A>
+ </LI>
+ <LI><I><A HREF="glOlympicCvsApplet.html">glOlympicCvsApplet</A>
: The Olympic Rings alone </I>
- </P>
- <LI><P ALIGN=LEFT><I><A HREF="glLogoCvsApplet.html">glLogoCvsApplet</A>
- : The OpenGL Logo alone</I></P>
- <LI><P ALIGN=LEFT><I><A HREF="glOlympicSwingApplet.html">glOlympicSwingApplet</A>
+ </LI>
+ <LI><I><A HREF="glLogoCvsApplet.html">glLogoCvsApplet</A>
+ : The OpenGL Logo alone</I></LI>
+ <LI><I><A HREF="glOlympicSwingApplet.html">glOlympicSwingApplet</A>
: The Olympic Rings using Swing (needs Swing 1.1 installed
- either)</I></P>
- <LI><P ALIGN=LEFT><I><A HREF="testTextPPM1.html">testTextPPM1</A>
+ either)</I></LI>
+ <LI><I><A HREF="testTextPPM1.html">testTextPPM1</A>
: A textured Box using Swing (needs Swing 1.1 installed
- either)</I></P>
+ either)</I></LI>
<BR>
- <LI><P ALIGN=LEFT><I><A HREF="GLLandScape/index.html">GLLandScape World</A>
+ <LI><I><A HREF="GLLandScape/index.html">GLLandScape World</A>
: The GLLandScape World
- </I></P>
- <LI><P ALIGN=LEFT><I><A HREF="MiscDemos/index.html">Misc Demos</A>
+ </I></LI>
+ <LI><I><A HREF="MiscDemos/index.html">Misc Demos</A>
: Some new ported demos.
- </I></P>
- <LI><P ALIGN=LEFT><I><A HREF="RonsDemos/index.html">Ron's Demos</A>
+ </I></LI>
+ <LI><I><A HREF="RonsDemos/index.html">Ron's Demos</A>
: Demo's ported by Ron Cemer
- </I></P>
- <LI><P ALIGN=LEFT><I><A HREF="HodglimsNeHe/index.html">Hodglim's NeHe Demos</A>
+ </I></LI>
+ <LI><I><A HREF="HodglimsNeHe/index.html">Hodglim's NeHe Demos</A>
: Here are the NeHe OpenGL Tutorial Demos originally ported by Hodglim
- </I></P>
- <LI><P ALIGN=LEFT><I><A HREF="GLFDemos/index.html">GLF Demos</A>
+ </I></LI>
+ <LI><I><A HREF="GLFDemos/index.html">GLF Demos</A>
: Demos for the new GLF Library (new font support)
- </I></P>
+ </I></LI>
<BR>
<P ALIGN=CENTER><SPAN STYLE="text-decoration: none"><I>For use with
@@ -49,14 +49,14 @@ the Java2-Plug-In: Tested with Win32,Netscape,Java2 <A HREF="Java2.txt">(see
Installation-instructions Java2)</A> ! </I></SPAN>
</P>
<UL>
- <LI><P ALIGN=LEFT><I><A HREF="glOlympicCvsAppletJ2P.html">glOlympicCvsAppletJ2P</A>
+ <LI><I><A HREF="glOlympicCvsAppletJ2P.html">glOlympicCvsAppletJ2P</A>
: Out of the demo directory of GL4Java </I>
- </P>
- <LI><P ALIGN=LEFT><I><A HREF="glLogoCvsAppletJ2P.html">glLogoCvsAppletJ2P</A>
- : Out of the demo directory of GL4Java</I></P>
- <LI><P ALIGN=LEFT><I><A HREF="testTextPPM1J2P.html">testTextPPM1J2P</A>
+ </LI>
+ <LI><I><A HREF="glLogoCvsAppletJ2P.html">glLogoCvsAppletJ2P</A></LI>
+ : Out of the demo directory of GL4Java</I>
+ <LI><I><A HREF="testTextPPM1J2P.html">testTextPPM1J2P</A>
: Out of the demo directory of GL4Java (needs Swing 1.1 installed
- either)</I></P>
+ either)</I></LI>
</UL>
<P ALIGN=CENTER><SPAN STYLE="text-decoration: none">
<a href="../../Installer/java.policy">The Java2 (sdk, jre, plugin 1.3) policy file example to give GL4Java the necessary permissions (Click here) !</a>
diff --git a/demos/makefile b/demos/makefile
index 56422c8..2ded077 100644
--- a/demos/makefile
+++ b/demos/makefile
@@ -28,9 +28,4 @@ cleanall: clean
rm -f *.class ${C_APPL_FILES:.c=}
rm -f $(find . -name \*.o -o -name \*.exe )
-windllcpy:
- cp /WIN_NT/system32/opengl32.dll .
- cp /WIN_NT/system32/opengl.dll .
- cp /WIN_NT/system32/gl4java.dll .
- cp /WIN_NT/system32/gl4java32.dll .