Bugzilla – Attachment 459 Details for
Bug 365
Bug on javax.media.opengl.glu.GLU.gluBuild2DMipmaps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Updated testcase for Jogl 2.0
Mipmap.java (text/x-java-source), 2.04 KB, created by
Michael
on 2013-05-04 08:35:56 CEST
(
hide
)
Description:
Updated testcase for Jogl 2.0
Filename:
MIME Type:
Creator:
Michael
Created:
2013-05-04 08:35:56 CEST
Size:
2.04 KB
patch
obsolete
> >import java.awt.BorderLayout; >import java.awt.Frame; >import java.awt.event.WindowEvent; >import java.awt.event.WindowListener; >import java.io.IOException; > >import javax.media.opengl.GLAutoDrawable; >import javax.media.opengl.GLCapabilities; >import javax.media.opengl.GLEventListener; >import javax.media.opengl.GLProfile; >import javax.media.opengl.awt.GLCanvas; > >import com.jogamp.opengl.util.texture.TextureIO; > >public class Mipmap { > > public static void main(String[] args) throws IllegalArgumentException, > IOException { > > System.setProperty("jogl.texture.nonpot", "true"); > > GLProfile glp = GLProfile.getDefault(); > GLCapabilities caps = new GLCapabilities(glp); > final GLCanvas canvas = new GLCanvas(caps); > final Frame frame = new Frame(); > frame.setSize(256, 256); > frame.add(canvas, BorderLayout.CENTER); > frame.addNotify(); > frame.setVisible(true); > > canvas.addGLEventListener(new GLEventListener() { > > public void reshape(GLAutoDrawable drawable, int x, int y, int width, > int height) { > } > > @Override > public void init(GLAutoDrawable drawable) { > try { > TextureIO.newTexture(getClass().getClassLoader().getResource("com/kablab/jogl/test/tick_hor_major.png"), true, "png"); > } catch (Exception e) { > e.printStackTrace(); > } > } > > @Override > public void dispose(GLAutoDrawable drawable) { > } > > @Override > public void display(GLAutoDrawable drawable) { > } > }); > > frame.addWindowListener(new WindowListener() { > > @Override > public void windowOpened(WindowEvent e) { > } > > @Override > public void windowIconified(WindowEvent e) { > } > > @Override > public void windowDeiconified(WindowEvent e) { > } > > @Override > public void windowDeactivated(WindowEvent e) { > } > > @Override > public void windowClosing(WindowEvent e) { > e.getWindow().dispose(); > } > > public void windowClosed(WindowEvent e) { > } > > @Override > public void windowActivated(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 365
:
135
|
136
|
137
| 459 |
508