From ed6fcf8543f9116c8e0bc9e5220b6b0158c3a4ed Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 15 Sep 2011 15:08:38 +0200 Subject: JOGLNewtApplet1Run: Add gl_alpha, gl_multisamplebuffer and gl_nodefaultkeylistener ; Cleanup --- .../jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 17 ++++++++++ .../jogamp/newt/awt/applet/JOGLNewtAppletBase.java | 37 +++++++--------------- 2 files changed, 28 insertions(+), 26 deletions(-) (limited to 'src/newt/classes') diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index 64ac66504..38a3d952d 100755 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -7,6 +7,7 @@ import java.awt.event.MouseMotionListener; import java.awt.event.KeyListener; import javax.media.opengl.*; + import com.jogamp.newt.awt.NewtCanvasAWT; import com.jogamp.newt.opengl.GLWindow; import java.awt.BorderLayout; @@ -40,11 +41,14 @@ import java.awt.BorderLayout; <param name="gl_swap_interval" value="1"> <param name="gl_undecorated" value="true"> <param name="gl_alwaysontop" value="true"> + <param name="gl_alpha" value="1"> + <param name="gl_multisamplebuffer" value="0"> <param name="gl_opaque" value="false"> <param name="gl_dx" value="10"> <param name="gl_dy" value="0"> <param name="gl_width" value="100"> <param name="gl_height" value="100"> + <param name="gl_nodefaultkeyListener" value="true"> <param name="gl_debug" value="false"> <param name="gl_trace" value="false"> <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp"> @@ -75,6 +79,9 @@ public class JOGLNewtApplet1Run extends Applet { boolean glUndecorated=false; boolean glAlwaysOnTop=false; boolean glOpaque=true; + int glAlphaBits=0; + int glNumMultisampleBuffer=0; + boolean glNoDefaultKeyListener = false; try { glEventListenerClazzName = getParameter("gl_event_listener_class"); glProfileName = getParameter("gl_profile"); @@ -84,10 +91,13 @@ public class JOGLNewtApplet1Run extends Applet { glUndecorated = JOGLNewtAppletBase.str2Bool(getParameter("gl_undecorated"), glUndecorated); glAlwaysOnTop = JOGLNewtAppletBase.str2Bool(getParameter("gl_alwaysontop"), glAlwaysOnTop); glOpaque = JOGLNewtAppletBase.str2Bool(getParameter("gl_opaque"), glOpaque); + glAlphaBits = JOGLNewtAppletBase.str2Int(getParameter("gl_alpha"), glAlphaBits); + glNumMultisampleBuffer = JOGLNewtAppletBase.str2Int(getParameter("gl_multisamplebuffer"), glNumMultisampleBuffer); glXd = JOGLNewtAppletBase.str2Int(getParameter("gl_dx"), glXd); glYd = JOGLNewtAppletBase.str2Int(getParameter("gl_dy"), glYd); glWidth = JOGLNewtAppletBase.str2Int(getParameter("gl_width"), glWidth); glHeight = JOGLNewtAppletBase.str2Int(getParameter("gl_height"), glHeight); + glNoDefaultKeyListener = JOGLNewtAppletBase.str2Bool(getParameter("gl_nodefaultkeyListener"), glNoDefaultKeyListener); } catch (Exception e) { e.printStackTrace(); } @@ -98,14 +108,21 @@ public class JOGLNewtApplet1Run extends Applet { base = new JOGLNewtAppletBase(glEventListenerClazzName, glSwapInterval, + glNoDefaultKeyListener, glDebug, glTrace); try { GLProfile.initSingleton(false); GLCapabilities caps = new GLCapabilities(GLProfile.get(glProfileName)); + caps.setAlphaBits(glAlphaBits); + if(0