Bugzilla – Attachment 249 Details for
Bug 494
Applications hang when making base frame visible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
test case
GLVersionTestJOGL2.java (text/x-java), 2.54 KB, created by
Bill Clark
on 2011-04-11 02:09:13 CEST
(
hide
)
Description:
test case
Filename:
MIME Type:
Creator:
Bill Clark
Created:
2011-04-11 02:09:13 CEST
Size:
2.54 KB
patch
obsolete
>/* > * GLVersionTestJOGL2.java > */ >//import javax.media.opengl.GL; >//import javax.media.opengl.GLAutoDrawable; >//import javax.media.opengl.GLCanvas; >//import javax.media.opengl.GLCapabilities; >//import javax.media.opengl.GLEventListener; >//import javax.media.opengl.glu.GLU; >import javax.swing.*; >import java.awt.*; >import java.io.*; >import com.jogamp.opengl.util.gl2.*; >import javax.media.opengl.awt.GLCanvas; >import com.jogamp.opengl.util.*; >import java.nio.*; >import static javax.media.opengl.GL2.*; >import javax.media.opengl.*; >import javax.media.opengl.glu.*; >import java.text.*; >import java.util.StringTokenizer; >import java.util.Scanner; >/** > * @author Bill Clark > */ >public class GLVersionTestJOGL2 extends JFrame implements GLEventListener { > GLCanvas canvas; // OpenGL canvas > GLCapabilities capabilities; > String extensions; // Supported Opengl extensions > String vendor; > String version; > String renderer; > GLUT glut = new GLUT(); > GLU glu = new GLU(); > int spin = 0; > > public GLVersionTestJOGL2() { > GLProfile.initSingleton(true); > GLProfile glp; > if(GLProfile.isGL3Available()){ > System.out.printf("GL3 is available"); > glp = GLProfile.get("GL2"); > } > else{ > System.out.printf("GL3 is NOT available\n"); > glp = GLProfile.getDefault(); > } > System.out.printf("Profile: %s\n",glp.toString()); > GLCapabilities caps = new GLCapabilities(glp); > canvas = new GLCanvas(caps); > canvas.addGLEventListener(this); > > Container contentPane = getContentPane(); > contentPane.add(canvas); > setBounds(50,50,200,200); > setTitle("JOGL2 Versions Test"); > setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > setVisible(true); > } > > public void Versions(GL2 gl, GLU glu) > { > // Get and print extensions > extensions = gl.glGetString(gl.GL_EXTENSIONS); > vendor = gl.glGetString(gl.GL_VENDOR); > version = gl.glGetString(gl.GL_VERSION); > renderer = gl.glGetString(gl.GL_RENDERER); > > System.out.println("Card Vendor: " + vendor); > System.out.println("GL Version: " + version); > System.out.println("Renderer: " + renderer+"\n"); > } > > > public void init(GLAutoDrawable drawable) > { > GL2 gl = drawable.getGL().getGL2(); > Versions(gl, glu); > } > > public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height){ > } > > public void display(GLAutoDrawable drawable){ > } > public void displayChanged (GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged){ > } > > public void dispose(GLAutoDrawable drawable) { > } > > public static void main(String[] args){ > new GLVersionTestJOGL2(); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 494
:
248
| 249