Skip to content

Commit

Permalink
GRAPHICS: Add defaultBlack shader material
Browse files Browse the repository at this point in the history
  • Loading branch information
mirv-sillyfish authored and DrMcCoy committed Nov 17, 2018
1 parent 7e01b52 commit d91c7e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/graphics/shader/materialman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ void MaterialManager::init() {
color[3] = 1.0f;
}
_resourceMap[material->getName()] = material;

material = new ShaderMaterial(ShaderMan.getShaderObject("default/color.frag", SHADER_FRAGMENT), "defaultBlack");
color = (float *)(material->getVariableData("_color"));
if (color) {
color[0] = 0.0f;
color[1] = 0.0f;
color[2] = 0.0f;
color[3] = 1.0f;
}
_resourceMap[material->getName()] = material;
}

void MaterialManager::deinit() {
Expand Down

0 comments on commit d91c7e7

Please sign in to comment.