com.badlogic.gdx.graphics.glutils
Class ImmediateModeRenderer20
java.lang.Object
com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20
- All Implemented Interfaces:
- ImmediateModeRenderer
public class ImmediateModeRenderer20
- extends java.lang.Object
- implements ImmediateModeRenderer
Immediate mode rendering class for GLES 2.0. The renderer will allow you to specify vertices on the fly and provides a default
shader for (unlit) rendering.
*
- Author:
- mzechner
Method Summary |
void |
begin(Matrix4 projModelView,
int primitiveType)
|
void |
color(float r,
float g,
float b,
float a)
|
static ShaderProgram |
createDefaultShader(boolean hasNormals,
boolean hasColors,
int numTexCoords)
Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified. |
void |
dispose()
|
void |
end()
|
int |
getMaxVertices()
|
int |
getNumVertices()
|
void |
normal(float x,
float y,
float z)
|
void |
setShader(ShaderProgram shader)
|
void |
texCoord(float u,
float v)
|
void |
vertex(float x,
float y,
float z)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImmediateModeRenderer20
public ImmediateModeRenderer20(boolean hasNormals,
boolean hasColors,
int numTexCoords)
ImmediateModeRenderer20
public ImmediateModeRenderer20(int maxVertices,
boolean hasNormals,
boolean hasColors,
int numTexCoords)
ImmediateModeRenderer20
public ImmediateModeRenderer20(int maxVertices,
boolean hasNormals,
boolean hasColors,
int numTexCoords,
ShaderProgram shader)
setShader
public void setShader(ShaderProgram shader)
begin
public void begin(Matrix4 projModelView,
int primitiveType)
- Specified by:
begin
in interface ImmediateModeRenderer
color
public void color(float r,
float g,
float b,
float a)
- Specified by:
color
in interface ImmediateModeRenderer
texCoord
public void texCoord(float u,
float v)
- Specified by:
texCoord
in interface ImmediateModeRenderer
normal
public void normal(float x,
float y,
float z)
- Specified by:
normal
in interface ImmediateModeRenderer
vertex
public void vertex(float x,
float y,
float z)
- Specified by:
vertex
in interface ImmediateModeRenderer
end
public void end()
- Specified by:
end
in interface ImmediateModeRenderer
getNumVertices
public int getNumVertices()
- Specified by:
getNumVertices
in interface ImmediateModeRenderer
getMaxVertices
public int getMaxVertices()
- Specified by:
getMaxVertices
in interface ImmediateModeRenderer
dispose
public void dispose()
- Specified by:
dispose
in interface ImmediateModeRenderer
createDefaultShader
public static ShaderProgram createDefaultShader(boolean hasNormals,
boolean hasColors,
int numTexCoords)
- Returns a new instance of the default shader used by SpriteBatch for GL2 when no shader is specified.
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)