Package com.jogamp.opengl
Class GLBufferStorage
- java.lang.Object
-
- com.jogamp.opengl.GLBufferStorage
-
public abstract class GLBufferStorage extends Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getImmutableFlags()
Returns the immutable storage flags, invalid if storage ismutable
.ByteBuffer
getMappedBuffer()
Returns the mapped ByteBuffer, or null if not mapped.int
getMutableUsage()
Returns the mutable storage usage or 0 if storage is notmutable
.int
getName()
Return the buffer namelong
getSize()
Return the buffer's storage size.boolean
isMutableStorage()
Returnstrue
if buffer's storage is mutable, i.e.String
toString()
String
toString(boolean skipMappedBuffer)
-
-
-
Method Detail
-
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
public final ByteBuffer getMappedBuffer()
Returns the mapped ByteBuffer, or null if not mapped. Mapping may occur via:
-
toString
public final String toString(boolean skipMappedBuffer)
-
-