public class BufferObject extends GL3ResourceBase
Constructor and Description |
---|
BufferObject(int target,
int BufferId) |
Modifier and Type | Method and Description |
---|---|
BufferObject |
acquire()
Signal the resource that something is holding a reference to it.
|
void |
allocate(com.jogamp.opengl.GL3 gl,
int size,
int usage) |
void |
bind(com.jogamp.opengl.GL3 gl) |
void |
dispose(com.jogamp.opengl.GL3 gl)
Dispose of resource
|
void |
fill(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff) |
void |
fill(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff,
int usage) |
void |
fill(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff,
int size,
int usage) |
void |
flushBufferRange(com.jogamp.opengl.GL3 gl,
int offset,
int length) |
static BufferObject |
generate(com.jogamp.opengl.GL3 gl,
int target) |
int |
getId() |
int |
getSize() |
int |
getUsage() |
boolean |
isDisposed()
Returns true if resource has been disposed
|
java.nio.ByteBuffer |
mapBuffer(com.jogamp.opengl.GL3 gl,
int access)
Retrieve a mapped buffer to the underlying Buffer data
|
java.nio.ByteBuffer |
mapBufferRange(com.jogamp.opengl.GL3 gl,
int offset,
int length,
int access)
Maps only a portion of the underlying buffer
|
java.nio.ByteBuffer |
mapNewBuffer(com.jogamp.opengl.GL3 gl)
First orphans the original buffer, potentially causing a re-allocation,
then returns a mapped buffer ready for writing.
|
void |
unbind(com.jogamp.opengl.GL3 gl) |
void |
unmapBuffer(com.jogamp.opengl.GL3 gl) |
void |
update(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff) |
void |
update(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff,
int start) |
void |
update(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer buff,
int start,
int size) |
dispose, disposeInvalid, disposeInvalid, disposeUnreferenced, disposeUnreferenced, releaseDispose, releaseDispose
isValid
acquireAndCount, getReferenceCount, release, releaseAndCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid
acquireAndCount, getReferenceCount, release, releaseAndCount
public void dispose(com.jogamp.opengl.GL3 gl)
dispose
in interface GL3Resource
dispose
in class GL3ResourceBase
gl
- active contextpublic boolean isDisposed()
GLResource
isDisposed
in interface GLResource
isDisposed
in class GLResourceBase
public void allocate(com.jogamp.opengl.GL3 gl, int size, int usage)
public void fill(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff)
public void fill(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff, int usage)
public void fill(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff, int size, int usage)
public void update(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff)
public void update(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff, int start)
public void update(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer buff, int start, int size)
public java.nio.ByteBuffer mapBuffer(com.jogamp.opengl.GL3 gl, int access)
gl
- GL hanldeaccess
- either GL3.GL_WRITE_ONLY, GL3.GL_READ_ONLY, or
GL3.GL_READ_WRITE;public java.nio.ByteBuffer mapBufferRange(com.jogamp.opengl.GL3 gl, int offset, int length, int access)
public void flushBufferRange(com.jogamp.opengl.GL3 gl, int offset, int length)
public java.nio.ByteBuffer mapNewBuffer(com.jogamp.opengl.GL3 gl)
public void unmapBuffer(com.jogamp.opengl.GL3 gl)
public void bind(com.jogamp.opengl.GL3 gl)
public void unbind(com.jogamp.opengl.GL3 gl)
public int getId()
public int getUsage()
public int getSize()
public BufferObject acquire()
ReferenceCounted
acquire
in interface GL3Resource
acquire
in interface GLResource
acquire
in interface ReferenceCounted
acquire
in class GL3ResourceBase
public static BufferObject generate(com.jogamp.opengl.GL3 gl, int target)