summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-11-09 20:07:21 +0100
committerSven Gothel <sgothel@jausoft.com>2010-11-09 20:07:21 +0100
commit597d10f5a5f743a51cfe56f3c381fd80e941a394 (patch)
treef28d0fcfaab03fc0534c0308a577ca0c0cc93d4f /src/newt/classes
parent7dce462b56f1e77e3cc2b68cb72c27a549c53f91 (diff)
Adding simple static main test entry to provide standalone autobuild verification
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 36302c55a..b1ad2fd26 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -41,6 +41,7 @@ import javax.media.nativewindow.*;
import javax.media.nativewindow.util.Point;
import javax.media.opengl.*;
import com.jogamp.opengl.impl.GLDrawableHelper;
+import com.jogamp.opengl.util.VersionInfo;
import javax.media.nativewindow.util.Insets;
/**
@@ -840,4 +841,35 @@ public class GLWindow implements GLAutoDrawable, Window {
public final void surfaceUpdated(Object updater, NativeSurface ns, long when) {
window.surfaceUpdated(updater, ns, when);
}
+
+ /**
+ * A most simple JOGL AWT test entry
+ */
+ public static void main(String args[]) {
+ GLCapabilities caps = new GLCapabilities( GLProfile.getDefault() );
+
+ GLWindow glWindow = GLWindow.create(caps);
+ glWindow.setSize(128, 128);
+
+ glWindow.addGLEventListener(new GLEventListener() {
+ public void init(GLAutoDrawable drawable) {
+ GL gl = drawable.getGL();
+ String prefix = "JOGL NEWT Test " + Thread.currentThread().getName();
+ System.err.println(VersionInfo.getInfo(null, prefix, gl).toString());
+ }
+
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ }
+
+ public void dispose(GLAutoDrawable drawable) {
+ }
+ });
+
+ glWindow.setVisible(true);
+ glWindow.destroy(true);
+ }
+
}