implemented 2D image coloring

This commit is contained in:
devZoGok
2021-10-19 19:06:40 +03:00
parent 54544b4d96
commit d2b0f24b03
14 changed files with 90 additions and 39 deletions
+6 -1
View File
@@ -43,6 +43,11 @@ namespace vb01{
if(type==MATERIAL_2D)
shader->setBool(lightingEnabled,"lightingEnabled");
shader->setBool(texturingEnabled,"texturingEnabled");
if(type==MATERIAL_GUI){
shader->setBool(diffuseColorEnabled,"diffuseColorEnabled");
if(diffuseColorEnabled)
shader->setVec4(diffuseColor,"diffuseColor");
}
if(texturingEnabled){
for(Texture *t : diffuseMapTextures)
t->select();
@@ -51,7 +56,7 @@ namespace vb01{
for(Texture *t : specularMapTextures)
t->select();
}
else{
else {
shader->setVec4(diffuseColor,"diffuseColor");
}
}