summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/GLJFrame.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/GLJFrame.java')
-rw-r--r--src/net/java/joglutils/GLJFrame.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/net/java/joglutils/GLJFrame.java b/src/net/java/joglutils/GLJFrame.java
index 9538c2f..270c323 100644
--- a/src/net/java/joglutils/GLJFrame.java
+++ b/src/net/java/joglutils/GLJFrame.java
@@ -555,4 +555,30 @@ public class GLJFrame extends JFrame {
public GLAutoDrawable getAutoDrawable() {
return (GLAutoDrawable)mainCanvas;
}
+
+ public static void main(String[] args) {
+ GLJFrame gljf = new GLJFrame(new GLEventListener() {
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
+ gl.glColor3f(1.0f,0.323f,0.8f);
+ gl.glBegin(GL.GL_TRIANGLE_STRIP);
+ gl.glVertex2d(0,0);
+ gl.glVertex2d(0.5,1.0);
+ gl.glVertex2d(-0.3,-0.9);
+ gl.glEnd();
+ }
+
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
+ }
+
+ });
+ gljf.setDefaultCloseOperation(gljf.EXIT_ON_CLOSE);
+ gljf.setVisible(true);
+ }
}