public class MrShaderProgram extends MrComponent
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MrShaderProgram.Data |
protected class |
MrShaderProgram.View |
mBound, mInitialized, mRenderingContext, TYPE_MESH, TYPE_SHADERPROGRAM, TYPE_TEXTURE| Constructor and Description |
|---|
MrShaderProgram(java.lang.String name,
MrShader vertexShader,
MrShader fragmentShader)
Creates a new Shader Program
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(MrAttribute attribute)
Adds an attribute to this shader program
|
void |
addUniform(MrUniform uniform)
Adds a uniform to this shader program
|
void |
bind()
Binds the component
|
void |
bindUniforms(java.util.Map<java.lang.String,MrUniformKey> uniformKeys)
Passes data to GPU from values in the uniform keys
|
java.util.Map<java.lang.Integer,MrAttribute> |
getAttributes()
Gets all attributes defined in this shader program
|
MrComponent.Data |
getData()
Gets the data layer linked to this object
|
MrShader |
getFragmentShader()
Gets the Fragment Shader linked to this program
|
int |
getId()
Gets the ID of this Shader Program
|
java.lang.String |
getName()
Gets the name of this component
|
java.lang.String |
getType()
Gets the type of this component
|
java.util.Map<java.lang.String,MrUniform> |
getUniforms()
Gets all uniforms defined for this program
|
MrShader |
getVertexShader()
Gets the Vertex Shader linked to this program
|
MrComponent.View |
getView()
Gets the rendering layer linked to this object
|
initialize, isBound, isInitialized, unbindpublic java.lang.String getType()
MrComponentgetType in class MrComponentpublic MrComponent.Data getData()
MrComponentgetData in class MrComponentpublic MrComponent.View getView()
MrComponentgetView in class MrComponentpublic java.lang.String getName()
MrComponentgetName in class MrComponentpublic void bind()
MrComponentbind in class MrComponentpublic int getId()
public MrShader getVertexShader()
public MrShader getFragmentShader()
public java.util.Map<java.lang.String,MrUniform> getUniforms()
public void addUniform(MrUniform uniform)
uniform - new uniformpublic void addAttribute(MrAttribute attribute)
attribute - new attributepublic java.util.Map<java.lang.Integer,MrAttribute> getAttributes()
public void bindUniforms(java.util.Map<java.lang.String,MrUniformKey> uniformKeys)
uniformKeys -