mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
setting vec4 uniforms
This commit is contained in:
@@ -32,6 +32,11 @@ namespace vb01{
|
||||
uni->animatable = animatable;
|
||||
}
|
||||
|
||||
void Material::setVec4Uniform(string name, Vector4 value){
|
||||
Vector4Uniform *uni = (Vector4Uniform*)getUniform(name);
|
||||
uni->value = value;
|
||||
}
|
||||
|
||||
void Material::update(){
|
||||
shader->use();
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ namespace vb01{
|
||||
Material(std::string, bool = false);
|
||||
~Material();
|
||||
void update();
|
||||
void setVec4Uniform(std::string, Vector4);
|
||||
void setTexUniform(std::string, Texture*, bool);
|
||||
Uniform* getUniform(std::string);
|
||||
inline Uniform* getUniform(int i){return uniforms[i];}
|
||||
|
||||
Reference in New Issue
Block a user