/** * @param mask * @see com.jogamp.opengl.GL#glClear(int) */ public void glClear(int mask) { try{delegate.glClear(mask);} catch(GLException e){glException(e); throw e;} } /**
@Override public void draw( final JCameraReadableSnapshotType s, final Optional<Vector3D> target) { final GL3 g = this.gl; if (g != null) { this.view = s.cameraMakeViewMatrix(); g.glClearDepth(1.0); g.glClearColor(0.0f, 0.0f, 0.2f, 1.0f); g.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT | GL.GL_STENCIL_BUFFER_BIT); g.glEnable(GL.GL_DEPTH_TEST); g.glDepthFunc(GL.GL_LEQUAL); g.glDisable(GL.GL_CULL_FACE); this.drawGround(g); this.drawSceneQuads(g); target.ifPresent(pos -> this.drawSceneTarget(g, pos)); } if (this.want_warp.get()) { final Window w = this.window; if (w != null) { w.warpPointer(w.getWidth() / 2, w.getHeight() / 2); this.want_warp.set(false); } } }
@Override public void display(GLAutoDrawable drawable) { //gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT); gl.glEnable(gl.GL_DEPTH_TEST); animateFrame(); drawMesh(gl); }
@Override protected void render() { // Enable the color and depth mask explicitly before calling glClear. // When they are not enabled, they will not be cleared! gl.glColorMask(true, true, true, true); gl.glDepthMask(true); gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); renderGltfModels(); }
@Override public void display(GLAutoDrawable glAutoDrawable) { GL3 gl = glAutoDrawable.getGL().getGL3(); gl.glClear(GL3.GL_DEPTH_BUFFER_BIT | GL3.GL_COLOR_BUFFER_BIT); gl.glUseProgram(program) gl.glBindVertexArray(vertexArray.get(0)); gl.glDrawArrays(GL.GL_TRIANGLES, 0, 6) }
gl.glClear(GL3.GL_COLOR_BUFFER_BIT); for (SoundEvent ev : activeEvents) {// TODO: Replace with Factory calls if (ev.isActive()) {
g.glClear(GL.GL_COLOR_BUFFER_BIT);
g.glClear(GL.GL_COLOR_BUFFER_BIT);
throw new RuntimeException("Object frame buffer setup failure. OpenGL code "+gpu.getGl().glCheckFramebufferStatus(GL3.GL_FRAMEBUFFER)); gpu.getGl().glClear(GL3.GL_COLOR_BUFFER_BIT);
throw new RuntimeException("Vertex frame buffer setup failure. OpenGL code "+gpu.getGl().glCheckFramebufferStatus(GL3.GL_FRAMEBUFFER)); gpu.getGl().glClear(GL3.GL_COLOR_BUFFER_BIT);
gl.glDepthFunc(GL2.GL_LESS); gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA); gl.glClear(GL3.GL_COLOR_BUFFER_BIT); gl.glDepthRange(0, 1); gl.glEnable(GL3.GL_DEPTH_CLAMP);