Пример #1
0
 public static void setBoundElementVBO(final RendererRecord rendRecord, final int id) {
   if (!rendRecord.isElementVboValid() || rendRecord.getCurrentElementVboId() != id) {
     ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, id);
     rendRecord.setCurrentElementVboId(id);
     rendRecord.setElementVboValid(true);
   }
 }
Пример #2
0
  public static void setBoundElementVBO(final RendererRecord rendRecord, final int id) {
    final GL gl = GLContext.getCurrentGL();

    if (!rendRecord.isElementVboValid() || rendRecord.getCurrentElementVboId() != id) {
      gl.glBindBuffer(GL.GL_ELEMENT_ARRAY_BUFFER, id);
      rendRecord.setCurrentElementVboId(id);
      rendRecord.setElementVboValid(true);
    }
  }