public interface Shader
extends org.mini2Dx.gdx.utils.Disposable
Modifier and Type | Method and Description |
---|---|
void |
begin()
Binds the shader for parameter modification
|
void |
end()
Unbinds the shader for parameter modification
|
java.lang.String |
getLog() |
ShaderType |
getShaderType()
Returns the
ShaderType (Note: different platforms require different types) |
boolean |
hasParameter(java.lang.String name)
Checks if the shader has the specified parameter (uniform, attribute, etc.).
|
boolean |
isCompiled()
Returns if this shader compiled successfully
|
void |
setParameter(java.lang.String name,
int bindId,
Texture texture)
Sets the specified texture parameter.
|
void |
setParameter(java.lang.String name,
Texture texture)
Sets the specified texture parameter.
|
void |
setParameterf(java.lang.String name,
float value)
Sets the specified float parameter (uniform).
|
void |
setParameterf(java.lang.String name,
float value1,
float value2)
Sets the specified parameter (uniform).
|
void |
setParameterf(java.lang.String name,
float value1,
float value2,
float value3)
Sets the specified parameter (uniform).
|
void |
setParameterf(java.lang.String name,
float value1,
float value2,
float value3,
float value4)
Sets the specified parameter (uniform or attribute).
|
void |
setParameterf(java.lang.String name,
org.mini2Dx.gdx.math.Vector2 vec)
Sets the specified parameter (uniform).
|
void |
setParameterf(java.lang.String name,
org.mini2Dx.gdx.math.Vector3 vec)
Sets the specified parameter (uniform).
|
void |
setParameteri(java.lang.String name,
int value)
Sets the specified parameter (uniform).
|
void |
setParameterMatrix(java.lang.String name,
org.mini2Dx.gdx.math.Matrix4 matrix)
Sets the specified parameter (uniform).
|
void |
setParameterMatrix(java.lang.String name,
org.mini2Dx.gdx.math.Matrix4 matrix,
boolean transpose)
Sets the specified parameter (uniform).
|
void begin()
void end()
boolean hasParameter(java.lang.String name)
name
- The parameter namevoid setParameter(java.lang.String name, Texture texture)
begin()
must be called before using this methodname
- The parameter nametexture
- The texture to bind to the parametervoid setParameter(java.lang.String name, int bindId, Texture texture)
begin()
must be called before using this methodname
- The parameter namebindId
- The texture bind ID to use on OpenGL platformstexture
- The texture to bind to the parametervoid setParameterf(java.lang.String name, float value)
begin()
must be called before using this methodname
- The parameter namevalue
- void setParameterf(java.lang.String name, float value1, float value2)
begin()
must be called before using this methodname
- The parameter namevalue1
- value2
- void setParameterf(java.lang.String name, float value1, float value2, float value3)
begin()
must be called before using this methodname
- The parameter namevalue1
- value2
- value3
- void setParameterf(java.lang.String name, float value1, float value2, float value3, float value4)
begin()
must be called before using this methodname
- The parameter namevalue1
- value2
- value3
- value4
- void setParameterf(java.lang.String name, org.mini2Dx.gdx.math.Vector2 vec)
begin()
must be called before using this methodname
- The parameter namevec
- void setParameterf(java.lang.String name, org.mini2Dx.gdx.math.Vector3 vec)
begin()
must be called before using this methodname
- The parameter namevec
- void setParameteri(java.lang.String name, int value)
begin()
must be called before using this methodname
- The parameter namevalue
- void setParameterMatrix(java.lang.String name, org.mini2Dx.gdx.math.Matrix4 matrix)
begin()
must be called before using this methodname
- The parameter namematrix
- void setParameterMatrix(java.lang.String name, org.mini2Dx.gdx.math.Matrix4 matrix, boolean transpose)
begin()
must be called before using this methodname
- The parameter namematrix
- transpose
- java.lang.String getLog()
boolean isCompiled()
ShaderType getShaderType()
ShaderType
(Note: different platforms require different types)