diff options
-rw-r--r-- | make/build-newt.xml | 2 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/impl/awt/opengl/VersionApplet.java | 88 |
2 files changed, 89 insertions, 1 deletions
diff --git a/make/build-newt.xml b/make/build-newt.xml index 5ac6c7eed..3487da217 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -90,7 +90,7 @@ value="com/jogamp/newt/*, com/jogamp/newt/event/*, com/jogamp/newt/util/*, com/jogamp/newt/impl/*, com/jogamp/newt/impl/event/*"/> <property name="java.part.awt" - value="com/jogamp/newt/impl/awt/*, com/jogamp/newt/awt/*, com/jogamp/newt/event/awt/*"/> + value="com/jogamp/newt/awt/*, com/jogamp/newt/event/awt/*, com/jogamp/newt/impl/awt/**"/> <property name="java.part.x11" value="com/jogamp/newt/impl/x11/*"/> diff --git a/src/newt/classes/com/jogamp/newt/impl/awt/opengl/VersionApplet.java b/src/newt/classes/com/jogamp/newt/impl/awt/opengl/VersionApplet.java new file mode 100644 index 000000000..e306fe681 --- /dev/null +++ b/src/newt/classes/com/jogamp/newt/impl/awt/opengl/VersionApplet.java @@ -0,0 +1,88 @@ +package com.jogamp.newt.impl.awt.opengl; + +import com.jogamp.common.GlueGenVersion; +import com.jogamp.common.util.VersionUtil; +import com.jogamp.nativewindow.NativeWindowVersion; +import com.jogamp.newt.NewtVersion; +import com.jogamp.opengl.JoglVersion; +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.TextArea; +import javax.media.opengl.GLProfile; +import javax.media.opengl.awt.GLCanvas; +import javax.media.opengl.GL; +import javax.media.opengl.GLAutoDrawable; +import javax.media.opengl.GLEventListener; + +public class VersionApplet extends Applet { + TextArea tarea; + + public void init() { + System.err.println("VersionApplet: init() - begin"); + GLProfile.initSingleton(false); + setLayout(new BorderLayout()); + String s; + + tarea = new TextArea(120, 80); + s = VersionUtil.getPlatformInfo().toString(); + System.err.println(s); + tarea.append(s); + + s = GlueGenVersion.getInstance().toString(); + System.err.println(s); + tarea.append(s); + + s = NativeWindowVersion.getInstance().toString(); + System.err.println(s); + tarea.append(NativeWindowVersion.getInstance().toString()); + + s = JoglVersion.getInstance().toString(); + System.err.println(s); + tarea.append(s); + + s = NewtVersion.getInstance().toString(); + System.err.println(s); + tarea.append(s); + + add(tarea, BorderLayout.CENTER); + + GLCanvas canvas = new GLCanvas(); + canvas.addGLEventListener(new GLInfo()); + add(canvas, BorderLayout.SOUTH); + System.err.println("VersionApplet: init() - end"); + } + + public void start() { + System.err.println("VersionApplet: start() - begin"); + System.err.println("VersionApplet: start() - end"); + } + + public void stop() { + // FIXME: do I need to do anything else here? + System.err.println("VersionApplet: stop() - begin"); + System.err.println("VersionApplet: stop() - end"); + } + + public void destroy() { + System.err.println("VersionApplet: destroy() - X"); + } + + class GLInfo implements GLEventListener { + public void init(GLAutoDrawable drawable) { + GL gl = drawable.getGL(); + String s = JoglVersion.getInstance().getGLInfo(gl, null).toString(); + System.err.println(s); + tarea.append(s); + } + + public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { + } + + public void display(GLAutoDrawable drawable) { + } + + public void dispose(GLAutoDrawable drawable) { + } + } + +} |