protected synchronized void updateVisibility(GL gl, Mesh mesh) {
Matrix projection = Matrix.getProjectionMatrix(gl);
IntBuffer buf = ByteBuffer.allocateDirect(9*4*4).order(ByteOrder.nativeOrder()).asIntBuffer();
+ gl.glFlush();
+ gl.glDrawBuffer(GL.GL_BACK);
+ gl.glReadBuffer( GL.GL_BACK );
+ gl.glPixelStorei( GL.GL_PACK_ALIGNMENT, 1);
+ gl.glFlush();
+ gl.glDisable(GL.GL_LIGHTING);
+ gl.glShadeModel(GL.GL_FLAT);
gl.glColor3f(0,0,0);
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
for(Mesh.T t : mesh) t.glTriangle(gl, null);