Bugzilla – Attachment 29 Details for
Bug 124
SIGSEGV on Fedora Core 3 / NVIDIA
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Simple test case
Test.java (text/plain), 2.44 KB, created by
Sven Gothel
on 2004-12-08 03:36:00 CET
(
hide
)
Description:
Simple test case
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2004-12-08 03:36:00 CET
Size:
2.44 KB
patch
obsolete
>package rob.jogltest; > >import java.awt.Dimension; > >import java.awt.event.WindowEvent; >import java.awt.event.WindowListener; > >import javax.swing.JFrame; > >import net.java.games.jogl.Animator; >import net.java.games.jogl.GL; >import net.java.games.jogl.GLCanvas; >import net.java.games.jogl.GLCapabilities; >import net.java.games.jogl.GLDrawable; >import net.java.games.jogl.GLDrawableFactory; >import net.java.games.jogl.GLEventListener; > >public class Test implements GLEventListener, WindowListener { > private JFrame jf; > private GLCanvas glCanvas; > private Animator animator; > > public void go() { > jf = new JFrame(); > > GLDrawableFactory fac = GLDrawableFactory.getFactory(); > GLCapabilities cap = new GLCapabilities(); > > glCanvas = fac.createGLCanvas(cap); > glCanvas.addGLEventListener(this); > > glCanvas.setPreferredSize(new Dimension(640,480)); > > jf.getContentPane().add(glCanvas); > jf.pack(); > jf.addWindowListener(this); > jf.setVisible(true); > > startRendering(); > > } > > private void startRendering() { > animator = new Animator(glCanvas); > animator.start(); > System.out.println("Animator started"); > } > > private void stopRendering() { > animator.stop(); > System.out.println("Animator stopped"); > } > > public void displayChanged( GLDrawable drawable, > boolean modeChanged, > boolean deviceChanged) { > GL gl = drawable.getGL(); > > } > > public void reshape(GLDrawable drawable, > int x, int y, > int width, int height) { > GL gl = drawable.getGL(); > } > > public void display(GLDrawable drawable) { > GL gl = drawable.getGL(); > > System.out.println("display >"); > try { > Thread.sleep(50); > } catch (InterruptedException ie) { > } > System.out.println("display <"); > } > > public void init(GLDrawable drawable) { > GL gl = drawable.getGL(); > } > > public static void main(String[] args) { > Test t = new Test(); > t.go(); > } > > public void windowActivated(WindowEvent e) { > } > > public void windowClosed(WindowEvent e) { > //System.exit(0); > } > > public void windowClosing(WindowEvent e) { > stopRendering(); > jf.setVisible(false); > jf.dispose(); > } > > public void windowDeactivated(WindowEvent e) { > } > > public void windowDeiconified(WindowEvent e) { > } > > public void windowIconified(WindowEvent e) { > } > > public void windowOpened(WindowEvent e) { > } > > >}
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 124
: 29 |
30
|
31
|
32