public class ImmediateModeRenderer10 extends java.lang.Object implements ImmediateModeRenderer
begin(int) with the primitive
type you want to render. Next you specify as many vertices as you want by first defining the vertex color, normal and texture
coordinates followed by the vertex position which finalizes the definition of a single vertex. When you are done specifying the
geometry you have to call end() to make the renderer render the geometry. Internally the
renderer uses vertex arrays to render the provided geometry. This is not the best performing way to do this so use this class
only for non performance critical low vertex count geometries while debugging.
Note that this class of course only works with OpenGL ES 1.x.| Constructor and Description |
|---|
ImmediateModeRenderer10()
Constructs a new ImmediateModeRenderer
|
ImmediateModeRenderer10(int maxVertices)
Constructs a new ImmediateModeRenderer
|
| Modifier and Type | Method and Description |
|---|---|
void |
begin(int primitiveType)
Starts a new list of primitives.
|
void |
begin(Matrix4 projModelView,
int primitiveType) |
void |
color(float r,
float g,
float b,
float a)
Specifies the color of the current vertex
|
void |
dispose() |
void |
end()
Renders the primitives just defined.
|
int |
getMaxVertices() |
int |
getNumVertices() |
void |
normal(float x,
float y,
float z)
Specifies the normal of the current vertex
|
void |
texCoord(float u,
float v)
Specifies the texture coordinates of the current vertex
|
void |
vertex(float x,
float y,
float z)
Specifies the position of the current vertex and finalizes it.
|
void |
vertex(Vector3 point) |
public ImmediateModeRenderer10()
public ImmediateModeRenderer10(int maxVertices)
public void begin(Matrix4 projModelView, int primitiveType)
begin in interface ImmediateModeRendererpublic void begin(int primitiveType)
primitiveType - the primitive type.public void color(float r,
float g,
float b,
float a)
color in interface ImmediateModeRendererr - the red componentg - the green componentb - the blue componenta - the alpha componentpublic void normal(float x,
float y,
float z)
normal in interface ImmediateModeRendererx - the x componenty - the y componentz - the z componentpublic void texCoord(float u,
float v)
texCoord in interface ImmediateModeRendereru - the u coordinatev - the v coordinatepublic void vertex(float x,
float y,
float z)
vertex in interface ImmediateModeRendererx - the x componenty - the y componentz - the z componentpublic int getNumVertices()
getNumVertices in interface ImmediateModeRendererpublic int getMaxVertices()
getMaxVertices in interface ImmediateModeRendererpublic void end()
end in interface ImmediateModeRendererpublic void vertex(Vector3 point)
public void dispose()
dispose in interface ImmediateModeRenderer