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, releaseDispose
acquireAndCount, getReferenceCount, release, releaseAndCount
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hashCode
disposeInvalid, disposeUnreferenced, releaseDispose
dispose, disposeInvalid, disposeUnreferenced, releaseDispose
acquireAndCount, getReferenceCount, release, releaseAndCount
public 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 GLResource
isValid
in class GLResourceBase
public void dispose()
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 GL3SharedObject acquire()
ReferenceCounted
acquire
in interface GL3Resource
acquire
in interface GL3SharedDrawable
acquire
in interface GLResource
acquire
in interface ReferenceCounted
acquire
in class GL3ResourceBase
public void drawWithVAO(com.jogamp.opengl.GL3 gl)
public void draw(com.jogamp.opengl.GL3 gl)
GL3SharedDrawable
draw
in interface GL3SharedDrawable
gl
- 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)
GL3SharedDrawable
drawInstanced
in interface GL3SharedDrawable
gl
- 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()
GL3SharedDrawable
getBindVersion
in interface GL3SharedDrawable
public void bind(com.jogamp.opengl.GL3 gl)
GL3SharedDrawable
bind
in interface GL3SharedDrawable
gl
- active contextpublic boolean equals(GL3SharedDrawable other)
GL3SharedDrawable
equals
in interface GL3SharedDrawable
other
- drawable to compare to