projects
/
anneal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkpoint
[anneal.git]
/
src
/
edu
/
berkeley
/
qfat
/
Viewer.java
diff --git
a/src/edu/berkeley/qfat/Viewer.java
b/src/edu/berkeley/qfat/Viewer.java
index
627b457
..
89ba7b3
100644
(file)
--- a/
src/edu/berkeley/qfat/Viewer.java
+++ b/
src/edu/berkeley/qfat/Viewer.java
@@
-83,6
+83,13
@@
public abstract class Viewer implements GLEventListener, MouseListener, MouseMot
protected synchronized void updateVisibility(GL gl, Mesh mesh) {
Matrix projection = Matrix.getProjectionMatrix(gl);
IntBuffer buf = ByteBuffer.allocateDirect(9*4*4).order(ByteOrder.nativeOrder()).asIntBuffer();
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);
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);