@Override public void glFlush() { gl.glFlush(); }
public static void glFlush( ) { gl().glFlush(); }
/** * Called back by the animator to perform per-frame rendering. */ @Override public void display(GLAutoDrawable glAutoDrawable) { GL2 gl = glAutoDrawable.getGL().getGL2(); // get the OpenGL 2 graphics context gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // clear background gl.glLoadIdentity(); // reset the model-view matrix // Rendering code /* There you can fill the whole window with a color, or draw something more beautiful... */ gl.glFlush(); /* Here goes testing cycle from mouseClicked(); and it works! */ }
public void display(GLAutoDrawable drawable) { System.out.println(what+": display"); GL2 gl = drawable.getGL().getGL2(); gl.glClear(GL2.GL_COLOR_BUFFER_BIT); gl.glColor3f(1.0f,1.0f,0.0f); gl.glBegin(GL2.GL_POLYGON); gl.glVertex3f(0.25f,0.25f,0.00f); gl.glVertex3f(0.75f,0.25f,0.00f); gl.glVertex3f(0.75f,0.75f,0.00f); gl.glVertex3f(0.25f,0.75f,0.00f); gl.glEnd(); gl.glFlush(); } public void dispose(GLAutoDrawable drawable) {
gl.glPopMatrix(); gl.glMatrixMode(GL2.GL_MODELVIEW); gl.glFlush();
@Override public void display(GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); // System.err.println("INIT GL IS: " + gl.getClass().getName()); GLU glu = new GLU(); // _direction_ gl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_POSITION, this.lightPos, 0); // clear color and depth buffers gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glLoadIdentity(); setCamera(glu); gl.glEnable(GL.GL_MULTISAMPLE); // String versionStr = gl.glGetString( GL2.GL_VERSION ); // log.info( "GL version:"+versionStr ); floor.draw(gl); axisLabels.draw(gl); // drawTextInfo(gl, this.simpleMoveAnimator.info()); // Flush all drawing operations to the graphics card gl.glFlush(); }
@Override public void display(GLAutoDrawable drawable) { this.simpleMoveAnimator.updateState(); GL2 gl = drawable.getGL().getGL2(); // System.err.println("INIT GL IS: " + gl.getClass().getName()); GLU glu = new GLU(); // _direction_ gl.glLightfv(GLLightingFunc.GL_LIGHT0, GLLightingFunc.GL_POSITION, this.lightPos, 0); // clear color and depth buffers gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW); gl.glLoadIdentity(); setCamera(glu); gl.glEnable(GL.GL_MULTISAMPLE); // String versionStr = gl.glGetString( GL2.GL_VERSION ); // log.info( "GL version:"+versionStr ); floor.draw(gl); axisLabels.draw(gl); // drawTextInfo(gl, this.simpleMoveAnimator.info()); // Flush all drawing operations to the graphics card gl.glFlush(); }
@Override public void draw(GL gl, GLU glu, Camera cam) { doTransform(gl, glu, cam); // Reset the current matrix to the "identity" GL2 gl2 = gl.getGL2(); gl2.glLoadIdentity(); // Draw A Quad //gl.glPolygonMode(GL2.GL_FRONT_AND_BACK, GL2.GL_FILL); gl2.glBegin(GL2.GL_QUADS); { gl2.glTexCoord2f(0.0f, 0.0f); gl2.glVertex3f(0.0f, SIZE, SIZE); gl2.glTexCoord2f(SIZE, 0.0f); gl2.glVertex3f(SIZE, SIZE, SIZE); gl2.glTexCoord2f(SIZE, SIZE); gl2.glVertex3f(SIZE, 0.0f, SIZE); gl2.glTexCoord2f(0.0f, SIZE); gl2.glVertex3f(0.0f, 0.0f, SIZE); } // Done Drawing The Quad gl2.glEnd(); // Flush all drawing operations to the graphics card gl2.glFlush(); }
gl.glPixelStorei(gl.GL_UNPACK_SKIP_PIXELS, 0); gl.glDisable(gl.GL_TEXTURE_RECTANGLE); gl.glFlush();
gl.glCopyTexSubImage2D(gl.GL_TEXTURE_RECTANGLE, 0, 0, 0, 0, 0, osdwidth, osdheight); gl.glFlush(); gl.glDisable(gl.GL_TEXTURE_RECTANGLE);