Package com.jogamp.opengl
Class GLBufferStorage
java.lang.Object
com.jogamp.opengl.GLBufferStorage
OpenGL buffer storage object reflecting it's
- storage size
- storage memory if mapped
- mutable usage or immutable flags
Buffer storage is created via:
GL.glBufferData(int, long, java.nio.Buffer, int)- storage creation via targetGL2.glNamedBufferDataEXT(int, long, java.nio.Buffer, int)- storage creation, directGL4.glNamedBufferData(int, long, java.nio.Buffer, int)- storage creation, directGL4.glBufferStorage(int, long, Buffer, int)- storage creation via targetGL4.glNamedBufferStorage(int, long, Buffer, int)- storage creation, direct
Buffer storage is disposed via:
GL.glDeleteBuffers(int, IntBuffer)- explicit, direct, via#notifyBuffersDeleted(int, IntBuffer)or#notifyBuffersDeleted(int, int[], int)GL.glBufferData(int, long, java.nio.Buffer, int)- storage recreation via targetGL2.glNamedBufferDataEXT(int, long, java.nio.Buffer, int)- storage recreation, directGL4.glNamedBufferData(int, long, java.nio.Buffer, int)- storage recreation, directGL4.glBufferStorage(int, long, Buffer, int)- storage recreation via targetGL4.glNamedBufferStorage(int, long, Buffer, int)- storage recreation, direct
GL buffer storage is mapped via
GLBase.mapBuffer(int, int)GLBase.mapBufferRange(int, long, long, int)GL2.mapNamedBufferEXT(int, int)GL2.mapNamedBufferRangeEXT(int, long, long, int)GL4.mapNamedBuffer(int, int)GL4.mapNamedBufferRange(int, long, long, int)
GL buffer storage is unmapped via
GL.glDeleteBuffers(int, IntBuffer)- buffer deletionGL.glUnmapBuffer(int)- explicit via targetGL2.glUnmapNamedBufferEXT(int)- explicit directGL4.glUnmapNamedBuffer(int)- explicit directGL.glBufferData(int, long, java.nio.Buffer, int)- storage recreation via targetGL2.glNamedBufferDataEXT(int, long, java.nio.Buffer, int)- storage recreation, directGL4.glNamedBufferData(int, long, java.nio.Buffer, int)- storage recreation, directGL4.glBufferStorage(int, long, Buffer, int)- storage creation via targetGL4.glNamedBufferStorage(int, long, Buffer, int)- storage creation, direct
-
Method Summary
Modifier and TypeMethodDescriptionfinal intReturns the immutable storage flags, invalid if storage ismutable.final ByteBufferReturns the mapped ByteBuffer, or null if not mapped.final intReturns the mutable storage usage or 0 if storage is notmutable.final intgetName()Return the buffer namefinal longgetSize()Return the buffer's storage size.final booleanReturnstrueif buffer's storage is mutable, i.e.final StringtoString()final StringtoString(boolean skipMappedBuffer)
-
Method Details
-
getName
public final int getName()Return the buffer name -
getSize
public final long getSize()Return the buffer's storage size. -
isMutableStorage
public final boolean isMutableStorage()Returnstrueif buffer's storage is mutable, i.e. created viaGL.glBufferData(int, long, java.nio.Buffer, int).Returns
falseif buffer's storage is immutable, i.e. created viaGL4.glBufferStorage(int, long, Buffer, int).- Returns:
-
getMutableUsage
public final int getMutableUsage()Returns the mutable storage usage or 0 if storage is notmutable. -
getImmutableFlags
public final int getImmutableFlags()Returns the immutable storage flags, invalid if storage ismutable. -
getMappedBuffer
Returns the mapped ByteBuffer, or null if not mapped. Mapping may occur via: -
toString
-
toString
-