public void setupNormalData(final FloatBufferData normalBufferData) { final GL gl = GLContext.getCurrentGL(); final FloatBuffer normalBuffer = normalBufferData != null ? normalBufferData.getBuffer() : null; if (normalBuffer == null) { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_NORMAL_ARRAY); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_NORMAL_ARRAY); } normalBuffer.rewind(); if (gl.isGL2ES1()) { gl.getGL2ES1().glNormalPointer(GL.GL_FLOAT, 0, normalBuffer); } } }
public void setupFogData(final FloatBufferData fogBufferData) { final GL gl = GLContext.getCurrentGL(); final FloatBuffer fogBuffer = fogBufferData != null ? fogBufferData.getBuffer() : null; if (fogBuffer == null) { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GL2.GL_FOG_COORDINATE_ARRAY); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GL2.GL_FOG_COORDINATE_ARRAY); } fogBuffer.rewind(); if (gl.isGL2()) { gl.getGL2().glFogCoordPointer(GL.GL_FLOAT, 0, fogBuffer); } } }
gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_TEXTURE_COORD_ARRAY); gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_TEXTURE_COORD_ARRAY);
public void setupVertexData(final FloatBufferData vertexBufferData) { final GL gl = GLContext.getCurrentGL(); final FloatBuffer vertexBuffer = vertexBufferData != null ? vertexBufferData.getBuffer() : null; if (vertexBuffer == null) { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY); } vertexBuffer.rewind(); if (gl.isGL2ES1()) { gl.getGL2ES1().glVertexPointer(vertexBufferData.getValuesPerTuple(), GL.GL_FLOAT, 0, vertexBuffer); } } }
public void setupColorData(final FloatBufferData colorBufferData) { final GL gl = GLContext.getCurrentGL(); final FloatBuffer colorBuffer = colorBufferData != null ? colorBufferData.getBuffer() : null; if (colorBuffer == null) { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY); } colorBuffer.rewind(); if (gl.isGL2ES1()) { gl.getGL2ES1().glColorPointer(colorBufferData.getValuesPerTuple(), GL.GL_FLOAT, 0, colorBuffer); } } }
gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_TEXTURE_COORD_ARRAY);
public void setupNormalDataVBO(final FloatBufferData data) { final GL gl = GLContext.getCurrentGL(); final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_NORMAL_ARRAY); } JoglRendererUtil.setBoundVBO(rendRecord, vboID); if (gl.isGL2ES1()) { gl.getGL2ES1().glNormalPointer(GL.GL_FLOAT, 0, 0); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_NORMAL_ARRAY); } } }
public void setupVertexDataVBO(final FloatBufferData data) { final GL gl = GLContext.getCurrentGL(); final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY); } JoglRendererUtil.setBoundVBO(rendRecord, vboID); if (gl.isGL2ES1()) { gl.getGL2ES1().glVertexPointer(data.getValuesPerTuple(), GL.GL_FLOAT, 0, 0); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY); } } }
public void setupColorDataVBO(final FloatBufferData data) { final GL gl = GLContext.getCurrentGL(); final RenderContext context = ContextManager.getCurrentContext(); final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY); } JoglRendererUtil.setBoundVBO(rendRecord, vboID); if (gl.isGL2ES1()) { gl.getGL2ES1().glColorPointer(data.getValuesPerTuple(), GL.GL_FLOAT, 0, 0); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY); } } }
public void setupFogDataVBO(final FloatBufferData data) { final GL gl = GLContext.getCurrentGL(); final RenderContext context = ContextManager.getCurrentContext(); final ContextCapabilities caps = context.getCapabilities(); if (!caps.isFogCoordinatesSupported()) { return; } final RendererRecord rendRecord = context.getRendererRecord(); final int vboID = setupVBO(data, context); if (vboID != 0) { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GL2.GL_FOG_COORDINATE_ARRAY); } JoglRendererUtil.setBoundVBO(rendRecord, vboID); if (gl.isGL2()) { gl.getGL2().glFogCoordPointer(GL.GL_FLOAT, 0, 0); } } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GL2.GL_FOG_COORDINATE_ARRAY); } } }
} else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_NORMAL_ARRAY); } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY); gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_TEXTURE_COORD_ARRAY); gl.getGL2GL3().glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY);