13.07.2015 Views

Manual de Apoio 2010

Manual de Apoio 2010

Manual de Apoio 2010

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Apêndice AExemplosA.1 Exemplo Simplespublic class OpenGL0 extends GLFrame {public OpenGL0 () {setSize (300 , 300) ;}@Overri<strong>de</strong>public void display ( GLAutoDrawable drawable ) {}@Overri<strong>de</strong>public void init ( GLAutoDrawable drawable ) {GLCanvas canvas = getCanvas ();GLCapabilities cap = canvas . getChosenGLCapabilities ();cap . setDoubleBuffered ( false );}GL2 gl = drawable . getGL (). getGL2 ();gl. glClearColor (0.0f, 0.0f, 1.0f, 1.0 f);gl. glClear (GL. GL_COLOR_BUFFER_BIT );gl. glFlush ();public static void main ( String [] args ) {new OpenGL0 (). setVisible ( true );}}113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!