public int getTupleCount() { return getBufferLimit() / _valuesPerTuple; }
bufferSizeBytes += normalCoords.getBufferLimit() * 4; bufferSizeBytes += colorCoords.getBufferLimit() * 4; bufferSizeBytes += textureBufferData.getBufferLimit() * 4; bufferSizeBytes += vertexCoords.getBufferLimit() * 4;
bufferSizeBytes += normalCoords.getBufferLimit() * 4; bufferSizeBytes += colorCoords.getBufferLimit() * 4; bufferSizeBytes += textureBufferData.getBufferLimit() * 4; bufferSizeBytes += vertexCoords.getBufferLimit() * 4;
if (normalCoords != null) { normalCoords.getBuffer().rewind(); gl.glBufferSubData(GL.GL_ARRAY_BUFFER, offset, normalCoords.getBufferLimit() * 4, normalCoords.getBuffer()); offset += normalCoords.getBufferLimit() * 4; gl.glBufferSubData(GL.GL_ARRAY_BUFFER, offset, colorCoords.getBufferLimit() * 4, colorCoords.getBuffer()); offset += colorCoords.getBufferLimit() * 4; if (textureBuffer != null) { textureBuffer.rewind(); gl.glBufferSubData(GL.GL_ARRAY_BUFFER, offset, textureBufferData.getBufferLimit() * 4, textureBuffer); offset += textureBufferData.getBufferLimit() * 4; gl.glBufferSubData(GL.GL_ARRAY_BUFFER, offset, vertexCoords.getBufferLimit() * 4, vertexCoords.getBuffer());
if (interleaved.getBufferLimit() > 0) { interleaved.getBuffer().rewind(); currLengthBytes = Math.round(interleaved.getBuffer().get()); GL11.glNormalPointer(GL11.GL_FLOAT, 0, offsetBytes); GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY); offsetBytes += normalCoords.getBufferLimit() * 4; } else { GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); GL11.glColorPointer(colorCoords.getValuesPerTuple(), GL11.GL_FLOAT, 0, offsetBytes); GL11.glEnableClientState(GL11.GL_COLOR_ARRAY); offsetBytes += colorCoords.getBufferLimit() * 4; } else { GL11.glDisableClientState(GL11.GL_COLOR_ARRAY); offsetBytes += textureBufferData.getBufferLimit() * 4;
ARBBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offsetBytes, normalCoords.getBuffer()); offsetBytes += normalCoords.getBufferLimit() * 4; ARBBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offsetBytes, colorCoords.getBuffer()); offsetBytes += colorCoords.getBufferLimit() * 4; ARBBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, offsetBytes, textureBuffer); offsetBytes += textureBufferData.getBufferLimit() * 4;
if (interleaved.getBufferLimit() > 0) { interleaved.getBuffer().rewind(); currLengthBytes = Math.round(interleaved.getBuffer().get()); gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_NORMAL_ARRAY); offsetBytes += normalCoords.getBufferLimit() * 4; } else { if (gl.isGL2GL3()) { gl.getGL2GL3().glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY); offsetBytes += colorCoords.getBufferLimit() * 4; } else { if (gl.isGL2GL3()) { offsetBytes); offsetBytes += textureBufferData.getBufferLimit() * 4;