List of usage examples for org.lwjgl.opengl GL11 glFinish
public static void glFinish()
From source file:org.terasology.rendering.dag.nodes.OutputToHMDNode.java
License:Apache License
private void renderFinalStereoImage(RenderingStage renderingStage) { // TODO: verify if we can use glCopyTexSubImage2D instead of pass-through shaders, // TODO: in terms of code simplicity and performance. switch (renderingStage) { case LEFT_EYE: vrProvider.updateState();//from w w w . j a va2s.c o m leftEyeFbo.bind(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderFullscreenQuad(); break; case RIGHT_EYE: rightEyeFbo.bind(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderFullscreenQuad(); vrProvider.submitFrame(); GL11.glFinish(); break; } // Bind the default FBO. The DAG does not recognize that this node has // bound a different FBO, so as far as it is concerned, FBO 0 is still // bound. As a result, without the below line, the image is only copied // to the HMD - not to the screen as we would like. To get around this, // we bind the default FBO here at the end. This is a bit brittle // because it assumes that FBO 0 is bound before this node is run. // TODO: break this node into two different nodes that use addDesiredStateChange(BindFbo...)) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); }
From source file:processing.opengl.PLWJGL.java
License:Open Source License
@Override public void finish() { GL11.glFinish(); }