/** Invalidates the IndexBufferObject so a new OpenGL buffer handle is created. Use this in case of a context loss. */ public void invalidate () { bufferHandle = createBufferObject(); isDirty = true; }
case VertexBufferObjectSubData: vertices = new VertexBufferObjectSubData(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break; case VertexBufferObjectWithVAO: vertices = new VertexBufferObjectWithVAO(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break;
case VertexBufferObjectSubData: vertices = new VertexBufferObjectSubData(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break; case VertexBufferObjectWithVAO: vertices = new VertexBufferObjectWithVAO(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break;
/** Invalidates the IndexBufferObject so a new OpenGL buffer handle is created. Use this in case of a context loss. */ public void invalidate () { bufferHandle = createBufferObject(); isDirty = true; }
OldVertexBufferObjectWithVAO oldVBOWithVAO = new OldVertexBufferObjectWithVAO(false, maxVertices, vertexAttributes); IndexBufferObjectSubData newIndices = new IndexBufferObjectSubData(false, maxIndices); IndexBufferObjectSubData oldIndices = new IndexBufferObjectSubData(false, maxIndices);
/** Creates a new IndexBufferObject to be used with vertex arrays. * * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); this.isDirect = true; usage = GL20.GL_STATIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }
case VertexBufferObjectSubData: vertices = new VertexBufferObjectSubData(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break; case VertexBufferObjectWithVAO: vertices = new VertexBufferObjectWithVAO(isStatic, maxVertices, attributes); indices = new IndexBufferObjectSubData(isStatic, maxIndices); isVertexArray = false; break;
/** Creates a new IndexBufferObject to be used with vertex arrays. * * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); this.isDirect = true; usage = GL20.GL_STATIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }
/** Creates a new IndexBufferObject. * * @param isStatic whether the index buffer is static * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (boolean isStatic, int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); isDirect = true; usage = isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }
/** Creates a new IndexBufferObject. * * @param isStatic whether the index buffer is static * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (boolean isStatic, int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); isDirect = true; usage = isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }
/** Invalidates the IndexBufferObject so a new OpenGL buffer handle is created. Use this in case of a context loss. */ public void invalidate () { bufferHandle = createBufferObject(); isDirty = true; }
/** Creates a new IndexBufferObject to be used with vertex arrays. * * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); this.isDirect = true; usage = GL20.GL_STATIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }
/** Creates a new IndexBufferObject. * * @param isStatic whether the index buffer is static * @param maxIndices the maximum number of indices this buffer can hold */ public IndexBufferObjectSubData (boolean isStatic, int maxIndices) { byteBuffer = BufferUtils.newByteBuffer(maxIndices * 2); isDirect = true; usage = isStatic ? GL20.GL_STATIC_DRAW : GL20.GL_DYNAMIC_DRAW; buffer = byteBuffer.asShortBuffer(); buffer.flip(); byteBuffer.flip(); bufferHandle = createBufferObject(); }