if(enable) { glf.glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY); glf.glVertexPointer(vArrayData); } else { glf.glDisableClientState(GLPointerFunc.GL_VERTEX_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 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); } } }
updateVBO(vertexCoords, rendRecord, vboID, offsetBytes); if (gl.isGL2ES1()) { gl.getGL2ES1().glVertexPointer(vertexCoords.getValuesPerTuple(), GL.GL_FLOAT, 0, offsetBytes);