public void setDepthRange(final double depthRangeNear, final double depthRangeFar) {
GLContext.getCurrentGL().glDepthRange(depthRangeNear, depthRangeFar);
}
public void setDrawBuffer(final DrawBufferTarget target) {
final RendererRecord record = ContextManager.getCurrentContext().getRendererRecord();
if (record.getDrawBufferTarget() != target) {
int buffer = GL.GL_BACK;
switch (target) {
case None:
case Back:
break;
case Front:
buffer = GL.GL_FRONT;
break;
case BackLeft:
buffer = GL2GL3.GL_BACK_LEFT;
break;
case BackRight:
buffer = GL2GL3.GL_BACK_RIGHT;
break;
case FrontLeft:
buffer = GL2GL3.GL_FRONT_LEFT;
break;
case FrontRight:
buffer = GL2GL3.GL_FRONT_RIGHT;
break;
case FrontAndBack:
buffer = GL.GL_FRONT_AND_BACK;
break;
case Left:
buffer = GL2GL3.GL_LEFT;
break;
case Right:
buffer = GL2GL3.GL_RIGHT;
break;
case Aux0:
buffer = GL2.GL_AUX0;
break;
case Aux1:
buffer = GL2.GL_AUX1;
break;
case Aux2:
buffer = GL2.GL_AUX2;
break;
case Aux3:
buffer = GL2.GL_AUX3;
break;
}
final GL gl = GLContext.getCurrentGL();
if (gl.isGL2GL3()) {
gl.getGL2GL3().glDrawBuffer(buffer);
}
record.setDrawBufferTarget(target);
}
}