i want to implement the same effect of the following code using open scene
graph. can it be possiable?
public void pushProjectionOffest(Double offset)
{
// Modify the projection transform to shift the depth values slightly
toward the camera in order to
// ensure the lines are selected during depth buffering.
GL gl = this.getGL();
float[] pm = new float[16];
gl.glGetFloatv(GL.GL_PROJECTION_MATRIX, pm, 0);
pm[10] *= offset != null ? offset : 0.99; // TODO: See Lengyel 2 ed.
Section 9.1.2 to compute optimal offset
gl.glPushAttrib(GL.GL_TRANSFORM_BIT);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glPushMatrix();
gl.glLoadMatrixf(pm, 0);
}
public void popProjectionOffest()
{
GL gl = this.getGL();
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glPopMatrix();
gl.glPopAttrib();
}
Shawl
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org