public abstract class GLPipelineRendererBase extends java.lang.Object implements GLPipelineRenderer
Constructor and Description |
---|
GLPipelineRendererBase() |
Modifier and Type | Method and Description |
---|---|
void |
begin(com.jogamp.opengl.GL gl,
int glMode,
int maxVertices)
Begins rendering of primitives
|
abstract void |
bind(com.jogamp.opengl.GL gl,
java.nio.ByteBuffer buff,
int normalOffset,
int colorOffset,
int texcoordOffset,
int positionOffset,
int vertexStride)
Prepare to start drawing
|
void |
color(int r,
int g,
int b,
int a)
Cues up a color to use for following vertices
|
void |
dispose(com.jogamp.opengl.GL gl)
Disposes of any resources.
|
void |
enableColors(boolean set)
Enables/disables per-vertex colors.
|
void |
enableNormals(boolean set)
Enables/disables per-vertex normals.
|
void |
enableTexCoords(boolean set)
Enables/disables per-vertex texture coordinates.
|
void |
end()
Ends drawing, flushing the pipeline if necessary
|
void |
flush()
Flushes the pipeline
|
com.jogamp.opengl.GL |
getGL()
The currently-active GL context if rendering.
|
boolean |
isColorsEnabled() |
boolean |
isEmpty()
Checks whether or not pipeline is empty
|
boolean |
isNormalsEnabled() |
boolean |
isTexCoordsEnabled() |
void |
normal(float x,
float y,
float z)
Cues up a normal to use for following vertices
|
void |
setup(boolean hasNormals,
boolean hasColors,
boolean hasTexcoords)
Set up properties of pipeline.
|
void |
texcoord(float x,
float y)
Cues up a texture coordinate to use for following
vertices
|
void |
vertex(float x,
float y,
float z)
Adds a vertex to the pipeline with the currently active
attributes.
|
public boolean isEmpty()
GLPipelineRenderer
isEmpty
in interface GLPipelineRenderer
public void setup(boolean hasNormals, boolean hasColors, boolean hasTexcoords)
GLPipelineRenderer
setup
in interface GLPipelineRenderer
public void enableNormals(boolean set)
GLPipelineRenderer
enableNormals
in interface GLPipelineRenderer
public boolean isNormalsEnabled()
isNormalsEnabled
in interface GLPipelineRenderer
public void enableColors(boolean set)
GLPipelineRenderer
enableColors
in interface GLPipelineRenderer
public boolean isColorsEnabled()
isColorsEnabled
in interface GLPipelineRenderer
public void enableTexCoords(boolean set)
GLPipelineRenderer
enableTexCoords
in interface GLPipelineRenderer
public boolean isTexCoordsEnabled()
isTexCoordsEnabled
in interface GLPipelineRenderer
public abstract void bind(com.jogamp.opengl.GL gl, java.nio.ByteBuffer buff, int normalOffset, int colorOffset, int texcoordOffset, int positionOffset, int vertexStride)
public void begin(com.jogamp.opengl.GL gl, int glMode, int maxVertices)
GLPipelineRenderer
begin
in interface GLPipelineRenderer
gl
- context to useglMode
- draw modemaxVertices
- maximum number of vertices before content
is flushed. This should be a valid multiple of the vertices
required to complete primitives in the given draw mode.public void normal(float x, float y, float z)
GLPipelineRenderer
normal
in interface GLPipelineRenderer
public void color(int r, int g, int b, int a)
GLPipelineRenderer
color
in interface GLPipelineRenderer
public void texcoord(float x, float y)
GLPipelineRenderer
texcoord
in interface GLPipelineRenderer
public void vertex(float x, float y, float z)
GLPipelineRenderer
vertex
in interface GLPipelineRenderer
public void flush()
GLPipelineRenderer
flush
in interface GLPipelineRenderer
public void end()
GLPipelineRenderer
end
in interface GLPipelineRenderer
public void dispose(com.jogamp.opengl.GL gl)
GLPipelineRenderer
dispose
in interface GLPipelineRenderer
public com.jogamp.opengl.GL getGL()
GLPipelineRenderer
GLPipelineRenderer.begin(GL, int, int)
and GLPipelineRenderer.end()
.getGL
in interface GLPipelineRenderer