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 int
Returns the immutable storage flags, invalid if storage ismutable
.final ByteBuffer
Returns the mapped ByteBuffer, or null if not mapped.final int
Returns the mutable storage usage or 0 if storage is notmutable
.final int
getName()
Return the buffer namefinal long
getSize()
Return the buffer's storage size.final boolean
Returnstrue
if buffer's storage is mutable, i.e.final String
toString()
final String
toString
(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()Returnstrue
if buffer's storage is mutable, i.e. created viaGL.glBufferData(int, long, java.nio.Buffer, int)
.Returns
false
if 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
-