Bugzilla – Attachment 31 Details for
Bug 124
SIGSEGV on Fedora Core 3 / NVIDIA
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test case file
JoglSimpleTest.java (text/plain), 2.22 KB, created by
Sven Gothel
on 2005-01-06 18:46:00 CET
(
hide
)
Description:
Test case file
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2005-01-06 18:46:00 CET
Size:
2.22 KB
patch
obsolete
>import java.awt.event.*; > >import javax.swing.*; > >import net.java.games.jogl.*; > >/** > * A simple test that Jogl is working. > * <p> > * Nothing is displayed. The window should come up normally and when the window > * is closed, it should exit normally. > * > * @author Sean Sylvis > */ >public class JoglSimpleTest implements GLEventListener >{ > private JFrame mFrame; > private Animator mAnimator; > > /** > * Constructs a JoglSimpleTest object. > */ > public JoglSimpleTest() > { > // Get GL drawing context > GLCanvas vCanvas = > GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); > vCanvas.addGLEventListener(this); > > // Create AWT frame > mFrame = new JFrame("Simple Test"); > mFrame.setSize(600, 400); > mFrame.getContentPane().add(vCanvas); > > // Create animation loop object > mAnimator = new Animator(vCanvas); > > // Define window-closing event > mFrame.addWindowListener(new WindowAdapter() > { > public void windowClosing(WindowEvent e) > { > close(); > } > }); > > mFrame.show(); > mAnimator.start(); > } > > // inherited comment > public void init(GLDrawable pDrawable) > { > GL gl = pDrawable.getGL(); > > // Set color buffer clear color > gl.glClearColor(1, 1, 1, 0); > } > > // inherited comment > public void reshape( > GLDrawable pDrawable, > int x, > int y, > int pWidth, > int pHeight) > { > } > > // inherited comment > public void display(GLDrawable pDrawable) > { > GL gl = pDrawable.getGL(); > > // Clear buffers > gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); > } > > // inherited comment > public void displayChanged( > GLDrawable drawable, > boolean modeChanged, > boolean deviceChanged) > { > } > > /** > * > */ > private void close() > { > mAnimator.stop(); > > mFrame.dispose(); > } > > /** > * @param pArguments > */ > public static void main(String[] pArguments) > { > new JoglSimpleTest(); > } >}
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