|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10
public class ImmediateModeRenderer10
An ImmediateModeRenderer allows you to perform immediate mode rendering as you were accustomed to in your desktop OpenGL
environment. In order to draw something you first have to call 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 Summary | |
---|---|
ImmediateModeRenderer10()
Constructs a new ImmediateModeRenderer |
|
ImmediateModeRenderer10(int maxVertices)
Constructs a new ImmediateModeRenderer |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImmediateModeRenderer10()
public ImmediateModeRenderer10(int maxVertices)
Method Detail |
---|
public void begin(Matrix4 projModelView, int primitiveType)
begin
in interface ImmediateModeRenderer
public void begin(int primitiveType)
primitiveType
- the primitive type.public void color(float r, float g, float b, float a)
color
in interface ImmediateModeRenderer
r
- the red componentg
- the green componentb
- the blue componenta
- the alpha componentpublic void normal(float x, float y, float z)
normal
in interface ImmediateModeRenderer
x
- the x componenty
- the y componentz
- the z componentpublic void texCoord(float u, float v)
texCoord
in interface ImmediateModeRenderer
u
- the u coordinatev
- the v coordinatepublic void vertex(float x, float y, float z)
vertex
in interface ImmediateModeRenderer
x
- the x componenty
- the y componentz
- the z componentpublic int getNumVertices()
getNumVertices
in interface ImmediateModeRenderer
public int getMaxVertices()
getMaxVertices
in interface ImmediateModeRenderer
public void end()
end
in interface ImmediateModeRenderer
public void vertex(Vector3 point)
public void dispose()
dispose
in interface ImmediateModeRenderer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |