public class UniformBufferObject extends BufferObject
Modifier and Type | Method and Description |
---|---|
UniformBufferObject |
acquire()
Signal the resource that something is holding a reference to it.
|
void |
bindLocation(com.jogamp.opengl.GL3 gl,
int program,
int location) |
void |
dispose(com.jogamp.opengl.GL3 gl)
Should be called to safely free memory before discarding
|
static UniformBufferObject |
generate(com.jogamp.opengl.GL3 gl,
int progId,
java.lang.String blockName,
java.lang.String[] attributes,
int usage) |
java.lang.String |
getAttribute(int attribId) |
java.lang.String |
getBlockName() |
java.nio.ByteBuffer |
getBuffer() |
int |
getByteOffset(int attribId) |
int |
getSize() |
int |
numAttributes() |
void |
set(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer data) |
void |
update(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer data) |
void |
update(com.jogamp.opengl.GL3 gl,
java.nio.ByteBuffer data,
int offset,
int size) |
allocate, bind, fill, fill, fill, flushBufferRange, generate, getId, getUsage, isDisposed, mapBuffer, mapBufferRange, mapNewBuffer, unbind, unmapBuffer, update
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 java.lang.String getBlockName()
public int getByteOffset(int attribId)
public java.lang.String getAttribute(int attribId)
public int numAttributes()
public int getSize()
getSize
in class BufferObject
public void bindLocation(com.jogamp.opengl.GL3 gl, int program, int location)
public void set(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer data)
public void update(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer data)
update
in class BufferObject
public void update(com.jogamp.opengl.GL3 gl, java.nio.ByteBuffer data, int offset, int size)
update
in class BufferObject
public java.nio.ByteBuffer getBuffer()
public void dispose(com.jogamp.opengl.GL3 gl)
dispose
in interface GL3Resource
dispose
in class BufferObject
gl
- active contextpublic UniformBufferObject acquire()
ReferenceCounted
acquire
in interface GL3Resource
acquire
in interface GLResource
acquire
in interface ReferenceCounted
acquire
in class BufferObject
public static UniformBufferObject generate(com.jogamp.opengl.GL3 gl, int progId, java.lang.String blockName, java.lang.String[] attributes, int usage)