if(enable) { glf.glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY); glf.glColorPointer(cArrayData); } else { glf.glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY);
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); } } }
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); } } }
updateVBO(colorCoords, rendRecord, vboID, offsetBytes); if (gl.isGL2ES1()) { gl.getGL2ES1().glColorPointer(colorCoords.getValuesPerTuple(), GL.GL_FLOAT, 0, offsetBytes);