Top Description Fields Constructors Methods
com.jogamp.opengl

public abstract Class GLBufferStorage

extends Object
Class Inheritance
Known Direct Subclasses
jogamp.opengl.GLBufferObjectTracker.GLBufferStorageImpl
Imports
java.nio.Buffer, .ByteBuffer, .IntBuffer

OpenGL buffer storage object reflecting it's

Buffer storage is created via:

Note that storage recreation as mentioned above also invalidate a previous storage instance, i.e. disposed the buffer's current storage if exist and attaches a new storage instance.

Buffer storage is disposed via:

GL buffer storage is mapped via

GL buffer storage is unmapped via

Field Summary

Modifier and TypeField and Description
private int
private ByteBuffer
private static final String
private int
private final int
private long

Constructor Summary

AccessConstructor and Description
protected
GLBufferStorage(final int name, final long size, final int mutableUsage, final int immutableFlags)

Method Summary

Modifier and TypeMethod and Description
public final int
getImmutableFlags()

Returns the immutable storage flags, invalid if storage is mutable.

public final ByteBuffer
getMappedBuffer()

Returns the mapped ByteBuffer, or null if not mapped.

public final int
getMutableUsage()

Returns the mutable storage usage or 0 if storage is not mutable.

public final int
getName()

Return the buffer name

public final long
getSize()

Return the buffer's storage size.

public final boolean
isMutableStorage()

Returns true if buffer's storage is mutable, i.e. created via GL#glBufferData(int, long, java.nio.Buffer, int).

protected void
reset(final long size, final int mutableUsage, final int immutableFlags)

protected void
public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public final String
toString(final boolean skipMappedBuffer)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

immutableFlagsback to summary
private int immutableFlags
mappedBufferback to summary
private ByteBuffer mappedBuffer
msgClazzNameback to summary
private static final String msgClazzName
mutableUsageback to summary
private int mutableUsage
nameback to summary
private final int name
sizeback to summary
private long size

Constructor Detail

GLBufferStorageback to summary
protected GLBufferStorage(final int name, final long size, final int mutableUsage, final int immutableFlags)

Method Detail

getImmutableFlagsback to summary
public final int getImmutableFlags()

Returns the immutable storage flags, invalid if storage is mutable.

getMappedBufferback to summary
public final ByteBuffer getMappedBuffer()

Returns the mapped ByteBuffer, or null if not mapped. Mapping may occur via:

getMutableUsageback to summary
public final int getMutableUsage()

Returns the mutable storage usage or 0 if storage is not mutable.

getNameback to summary
public final int getName()

Return the buffer name

getSizeback to summary
public final long getSize()

Return the buffer's storage size.

isMutableStorageback to summary
public final boolean isMutableStorage()

Returns true if buffer's storage is mutable, i.e. created via GL#glBufferData(int, long, java.nio.Buffer, int).

Returns false if buffer's storage is immutable, i.e. created via GL4#glBufferStorage(int, long, Buffer, int).

resetback to summary
protected void reset(final long size, final int mutableUsage, final int immutableFlags)
setMappedBufferback to summary
protected void setMappedBuffer(final ByteBuffer buffer)
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

toStringback to summary
public final String toString(final boolean skipMappedBuffer)