kick
|
Public Member Functions | |
Shader (std::string vertexShader="", std::string fragmentShader="", std::string geometryShader="") | |
If vertexShader and fragmentShader is specified then apply is called. | |
Shader (Shader &&s) | |
Shader (const Shader &) | |
Shader & | operator= (Shader &&other) |
void | setShaderSource (ShaderType type, std::string str) |
std::string | getShaderSource (ShaderType type) const |
std::string | getPrecompiledShaderSource (ShaderType type) const |
bool | apply () |
throws ShaderBuildException if unsuccessfull | |
void | bind () |
const std::vector < AttributeDescriptor > & | getShaderAttributes () const |
const std::vector < UniformDescriptor > & | getShaderUniforms () const |
const AttributeDescriptor * | getShaderAttribute (VertexAttributeSemantic semantic) const |
const UniformDescriptor * | getShaderUniform (std::string name) const |
void | setBlend (bool b) |
bool | blend () |
BlendType | blendDFactorAlpha () |
BlendType | blendDFactorRGB () |
BlendType | blendSFactorAlpha () |
BlendType | blendSFactorRGB () |
void | setBlendDFactorAlpha (BlendType blendDFactorAlpha) |
void | setBlendDFactorRGB (BlendType blendDFactorRGB) |
void | setBlendSFactorAlpha (BlendType blendSFactorAlpha) |
void | setBlendSFactorRGB (BlendType blendSFactorRGB) |
void | setDepthWrite (bool depthMask) |
bool | depthWrite () |
void | setFaceCulling (FaceCullingType faceCulling) |
FaceCullingType | faceCulling () |
void | setPolygonOffsetEnabled (bool polygonOffsetEnabled) |
bool | polygonOffsetEnabled () |
void | setPolygonOffsetFactorAndUnit (glm::vec2 polygonOffsetFactorAndUnit) |
glm::vec2 | polygonOffsetFactorAndUnit () |
void | setZTest (ZTestType zTest) |
ZTestType | zTest () |
const std::vector < AttributeDescriptor > & | shaderAttributes () |
void | bind_uniforms (Material *material, EngineUniforms *engineUniforms, Transform *transform) |
GLuint | shaderProgram () |
void | setDefaultUniform (std::string name, int value) |
void | setDefaultUniform (std::string name, float value) |
void | setDefaultUniform (std::string name, glm::vec4 value) |
void | setDefaultUniform (std::string name, glm::mat3 value) |
void | setDefaultUniform (std::string name, glm::mat4 value) |
void | setDefaultUniform (std::string name, std::shared_ptr< Texture2D > value) |
void | setDefaultUniform (std::string name, std::shared_ptr< TextureCube > value) |
bool | tryGetDefaultUniform (std::string name, MaterialData &value) |
int | getRenderOrder () const |
void | setRenderOrder (int renderOrder) |
Static Public Member Functions | |
static std::string | getPrecompiledSource (std::string source, ShaderType type) |
Public Attributes | |
Event< ShaderEvent > | shaderChanged |