public final class JoGLBuffersManager extends java.lang.Object implements BuffersManager
| Constructor and Description |
|---|
JoGLBuffersManager()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
bindColorsBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
Bind the given buffer as color buffer.
|
int |
bindIndicesBuffer(com.jogamp.opengl.GL2 gl,
IndicesBuffer buffer)
Bind the given buffer as indices buffer.
|
int |
bindNormalsBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
Bind the given buffer as normal buffer.
|
int |
bindTextureCoordinatesBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
Bind the given buffer as texture coordinate buffer.
|
int |
bindVertexBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
Bind the given buffer as vertex buffer.
|
ElementsBuffer |
createElementsBuffer()
Create an elements buffer.
|
IndicesBuffer |
createIndicesBuffer()
Create an indices buffer.
|
void |
dispose(java.util.Collection<? extends DataBuffer> buffers)
Release all resources used by the given buffers.
|
void |
dispose(DataBuffer buffer)
Release all resources used by the given buffer.
|
void |
glReload()
Called when previous OpenGl context is gone.
|
void |
glSynchronize(com.jogamp.opengl.GL2 gl)
Called before rendering for synchronisation.
|
public ElementsBuffer createElementsBuffer()
BuffersManagercreateElementsBuffer in interface BuffersManagerpublic IndicesBuffer createIndicesBuffer()
BuffersManagercreateIndicesBuffer in interface BuffersManagerpublic void dispose(DataBuffer buffer)
BuffersManagerdispose in interface BuffersManagerbuffer - the given buffer.public void dispose(java.util.Collection<? extends DataBuffer> buffers)
BuffersManagerdispose in interface BuffersManagerbuffers - the given buffers.public void glReload()
public void glSynchronize(com.jogamp.opengl.GL2 gl)
gl - the OpenGl context.public int bindVertexBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
gl - the OpenGl context where the buffer is bind.buffer - the buffer to bind.public int bindNormalsBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
gl - the OpenGl context where the buffer is bind.buffer - the buffer to bind.public int bindTextureCoordinatesBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
gl - the OpenGl context where the buffer is bind.buffer - the buffer to bind.public int bindColorsBuffer(com.jogamp.opengl.GL2 gl,
ElementsBuffer buffer)
gl - the OpenGl context where the buffer is bind.buffer - the buffer to bind.public int bindIndicesBuffer(com.jogamp.opengl.GL2 gl,
IndicesBuffer buffer)
gl - the OpenGl context where the buffer is bind.buffer - the buffer to bind.