public class GL3FlexObject extends GL3ResourceBase
Modifier and Type | Method and Description |
---|---|
void |
begin(com.jogamp.opengl.GL3 gl,
boolean hasNormal,
boolean hasColor,
boolean hasTexcoord,
int maxVertices)
Begins constructing object
|
void |
begin(com.jogamp.opengl.GL3 gl,
boolean hasNormal,
boolean hasColor,
boolean hasTexcoord,
int maxVertices,
int maxIndices)
Begins constructing object
|
void |
begin(com.jogamp.opengl.GL3 gl,
int maxVertices)
Begins constructing VBOs.
|
void |
color(byte[] rgba)
Sets the current color to use for new vertices, including RGBA.
|
void |
color(byte[] rgba,
int offset)
Sets the current color to use for new vertices, including RGBA.
|
void |
color(java.awt.Color color)
Sets the current color to use for new vertices, including RGBA.
|
void |
color(float[] rgba,
int offset)
Sets the current color to use for new vertices, including RGBA.
|
void |
color(int r,
int g,
int b,
int a)
Sets the current color to use for new vertices, including RGBA.
|
void |
dispose(com.jogamp.opengl.GL3 gl)
Discard data, regardless of references
|
void |
drawElements(com.jogamp.opengl.GL3 gl,
int mode) |
void |
drawElements(com.jogamp.opengl.GL3 gl,
int mode,
int count) |
void |
drawElements(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count) |
void |
drawVertices(com.jogamp.opengl.GL3 gl,
int mode) |
void |
drawVertices(com.jogamp.opengl.GL3 gl,
int mode,
int count) |
void |
drawVertices(com.jogamp.opengl.GL3 gl,
int mode,
int start,
int count) |
void |
end(com.jogamp.opengl.GL3 gl)
Ends building VBOs, commits to GPU
|
static GL3FlexObject |
generate(com.jogamp.opengl.GL3 gl,
GL3VertexAttributeInfo posAttr,
GL3VertexAttributeInfo nrmAttr,
GL3VertexAttributeInfo clrAttr,
GL3VertexAttributeInfo texAttr) |
int |
index(int... vidxs) |
int |
index(int v0)
Adds vertices to the index buffer
|
int |
indexRange(int vstart,
int vend)
Adds vertices to the index buffer
|
boolean |
isDisposed()
Returns true if resource has been disposed
|
void |
normal(float[] nrm)
Sets the current normal to use for new vertices
|
void |
normal(float[] nrm,
int offset)
Sets the current normal to use for new vertices
|
void |
normal(float x,
float y,
float z)
Sets the current normal to use for new vertices
|
void |
texcoord(float[] xy)
Sets the current texture coordinate
|
void |
texcoord(float[] xy,
int offset)
Sets the current texture coordinate
|
void |
texcoord(float x,
float y)
Sets the current texture coordinate
|
int |
vertex(float[] pos)
Adds a new vertex at the supplied position
|
int |
vertex(float[] pos,
int offset)
Adds a new vertex at the supplied position
|
int |
vertex(float x,
float y,
float z)
Adds a new vertex at the supplied position
|
acquire, 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 begin(com.jogamp.opengl.GL3 gl, int maxVertices)
public void begin(com.jogamp.opengl.GL3 gl, boolean hasNormal, boolean hasColor, boolean hasTexcoord, int maxVertices)
public void begin(com.jogamp.opengl.GL3 gl, boolean hasNormal, boolean hasColor, boolean hasTexcoord, int maxVertices, int maxIndices)
maxIndices
- max size of index bufferpublic void normal(float[] nrm, int offset)
offset
- into nrm arraypublic void normal(float[] nrm)
public void normal(float x, float y, float z)
public void color(java.awt.Color color)
color
- 4-colorpublic void color(int r, int g, int b, int a)
r
- redg
- greenb
- bluea
- alphapublic void color(byte[] rgba)
rgba
- 4-colorpublic void color(float[] rgba, int offset)
rgba
- 4-coloroffset
- offset into rgba arraypublic void color(byte[] rgba, int offset)
rgba
- 4-coloroffset
- offset into rgba arraypublic void texcoord(float[] xy)
xy
- 2D texture coordinatepublic void texcoord(float[] xy, int offset)
xy
- 2D texture coordinateoffset
- offset into coordinate arraypublic void texcoord(float x, float y)
public int vertex(float[] pos)
pos
- positionpublic int vertex(float[] pos, int offset)
pos
- positionoffset
- offset into position arraypublic int vertex(float x, float y, float z)
public int index(int v0)
v0
- vertex indexpublic int index(int... vidxs)
public int indexRange(int vstart, int vend)
vstart
- starting vertex indexvend
- ending vertex index (included)public void end(com.jogamp.opengl.GL3 gl)
public void drawVertices(com.jogamp.opengl.GL3 gl, int mode)
public void drawVertices(com.jogamp.opengl.GL3 gl, int mode, int count)
public void drawVertices(com.jogamp.opengl.GL3 gl, int mode, int start, int count)
public void drawElements(com.jogamp.opengl.GL3 gl, int mode)
public void drawElements(com.jogamp.opengl.GL3 gl, int mode, int count)
public void drawElements(com.jogamp.opengl.GL3 gl, int mode, int start, int count)
public void dispose(com.jogamp.opengl.GL3 gl)
GL3Resource
dispose
in interface GL3Resource
dispose
in class GL3ResourceBase
gl
- active contextpublic boolean isDisposed()
GLResource
isDisposed
in interface GLResource
isDisposed
in class GLResourceBase
public static GL3FlexObject generate(com.jogamp.opengl.GL3 gl, GL3VertexAttributeInfo posAttr, GL3VertexAttributeInfo nrmAttr, GL3VertexAttributeInfo clrAttr, GL3VertexAttributeInfo texAttr)