public class GL3SharedObject extends GL3ResourceBase implements GL3SharedDrawable
| Modifier and Type | Class and Description |
|---|---|
static class |
GL3SharedObject.DrawType |
| Constructor and Description |
|---|
GL3SharedObject(GL3VertexAttributeArray[] attributes,
GL3ElementAttributeArray elements) |
GL3SharedObject(GL3VertexAttributeArray[] attributes,
GL3ElementAttributeArray elements,
int glMode) |
GL3SharedObject(GL3VertexAttributeArray[] attributes,
GL3ElementAttributeArray elements,
VertexBufferObject[] vbos,
IndexBufferObject ibo,
int glMode) |
| Modifier and Type | Method and Description |
|---|---|
GL3SharedObject |
acquire()
Signal the resource that something is holding a reference to it.
|
void |
bind(com.jogamp.opengl.GL3 gl)
Binds attributes to the currently active GL object
|
void |
bindAttributes(com.jogamp.opengl.GL3 gl)
Bind program attributes to the given program (uses the program's attribute
locations)
|
int |
createVAO(com.jogamp.opengl.GL3 gl)
Creates and binds a vertex array object attached to a given program.
|
void |
dispose()
Release hold on any VBOs/IBOs
|
void |
dispose(com.jogamp.opengl.GL3 gl)
Release hold on any VBOs/IBOs
|
void |
draw(com.jogamp.opengl.GL3 gl)
Draw to the provided active context
|
void |
draw(com.jogamp.opengl.GL3 gl,
int start,
int count) |
void |
draw(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count) |
void |
drawArrays(com.jogamp.opengl.GL3 gl,
int mode) |
void |
drawArrays(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count) |
void |
drawElements(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int indexType) |
void |
drawInstanced(com.jogamp.opengl.GL3 gl,
int instances)
Draw using instanced rendering to the active context
|
void |
drawInstanced(com.jogamp.opengl.GL3 gl,
int mode,
int instanceCount) |
void |
drawInstancedArray(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int instances) |
void |
drawInstancedElements(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int instances) |
void |
drawWithVAO(com.jogamp.opengl.GL3 gl)
Inefficient, generates VAO and destroys it
|
boolean |
equals(GL3SharedDrawable other)
Compares to another drawable to see if same
|
int |
getBindVersion()
A version number corresponding to the necessary bound state
of the drawable's attributes.
|
int |
getCount() |
GL3SharedObject.DrawType |
getDrawType() |
GL3ElementAttributeArray |
getGL3ElementAttribute() |
GL3VertexAttributeArray[] |
getGL3VertexAttributes() |
int |
getMode() |
int |
getNumInstances() |
int |
getStart() |
boolean |
isDisposed()
Returns true if resource has been disposed
|
boolean |
isValid()
Checks whether all internal GL resources are still valid
|
void |
setDrawInfo(int start,
int count,
int glMode) |
void |
setDrawInfo(int start,
int count,
int glMode,
int numInstances) |
dispose, disposeInvalid, disposeInvalid, disposeUnreferenced, disposeUnreferenced, releaseDispose, releaseDisposeacquireAndCount, getReferenceCount, release, releaseAndCountequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithashCodedisposeInvalid, disposeUnreferenced, releaseDisposedispose, disposeInvalid, disposeUnreferenced, releaseDisposeacquireAndCount, getReferenceCount, release, releaseAndCountpublic GL3SharedObject(GL3VertexAttributeArray[] attributes, GL3ElementAttributeArray elements)
public GL3SharedObject(GL3VertexAttributeArray[] attributes, GL3ElementAttributeArray elements, int glMode)
public GL3SharedObject(GL3VertexAttributeArray[] attributes, GL3ElementAttributeArray elements, VertexBufferObject[] vbos, IndexBufferObject ibo, int glMode)
public void bindAttributes(com.jogamp.opengl.GL3 gl)
public int createVAO(com.jogamp.opengl.GL3 gl)
public GL3VertexAttributeArray[] getGL3VertexAttributes()
public GL3ElementAttributeArray getGL3ElementAttribute()
public int getMode()
public int getStart()
public int getCount()
public int getNumInstances()
public GL3SharedObject.DrawType getDrawType()
public void setDrawInfo(int start,
int count,
int glMode)
public void setDrawInfo(int start,
int count,
int glMode,
int numInstances)
public boolean isValid()
isValid in interface GLResourceisValid in class GLResourceBasepublic void dispose()
public void dispose(com.jogamp.opengl.GL3 gl)
dispose in interface GL3Resourcedispose in class GL3ResourceBasegl - active contextpublic boolean isDisposed()
GLResourceisDisposed in interface GLResourceisDisposed in class GLResourceBasepublic GL3SharedObject acquire()
ReferenceCountedacquire in interface GL3Resourceacquire in interface GL3SharedDrawableacquire in interface GLResourceacquire in interface ReferenceCountedacquire in class GL3ResourceBasepublic void drawWithVAO(com.jogamp.opengl.GL3 gl)
public void draw(com.jogamp.opengl.GL3 gl)
GL3SharedDrawabledraw in interface GL3SharedDrawablegl - active contextpublic void drawArrays(com.jogamp.opengl.GL3 gl,
int mode)
public void drawArrays(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count)
public void drawElements(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int indexType)
public void drawInstancedArray(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int instances)
public void drawInstancedElements(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count,
int instances)
public void drawInstanced(com.jogamp.opengl.GL3 gl,
int mode,
int instanceCount)
public void drawInstanced(com.jogamp.opengl.GL3 gl,
int instances)
GL3SharedDrawabledrawInstanced in interface GL3SharedDrawablegl - context handleinstances - number of instancespublic void draw(com.jogamp.opengl.GL3 gl,
int start,
int count)
public void draw(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count)
public int getBindVersion()
GL3SharedDrawablegetBindVersion in interface GL3SharedDrawablepublic void bind(com.jogamp.opengl.GL3 gl)
GL3SharedDrawablebind in interface GL3SharedDrawablegl - active contextpublic boolean equals(GL3SharedDrawable other)
GL3SharedDrawableequals in interface GL3SharedDrawableother - drawable to compare to