History

getting ready for pr for a few syntax issues

Sam Gateau committed 11 years ago

Commit b8db0ff1 parent 423434a2 files · +7 −3Browse files

Showing the changes to libraries/render-utils/src/Model.cpp (1 of 2 files). Show all

Unified · Split

libraries/render-utils/src/Model.cpp+6−1
@@ -710,13 +710,18 @@ bool Model::renderCore(float alpha, RenderMode mode, RenderArgs* args) { · 709 unmodified lines
710710 }
711711 GLBATCH(glEnable)(GL_DEPTH_TEST);
712712 GLBATCH(glDepthFunc)(GL_LEQUAL);
713+ if (mode == SHADOW_RENDER_MODE) {
714+ GLBATCH(glDepthFunc)(GL_ALWAYS);
715+ }
713716 GLBATCH(glDepthMask)(true);
714717
715718 // render opaque meshes with alpha testing
716719
717720 GLBATCH(glDisable)(GL_BLEND);
718721 GLBATCH(glEnable)(GL_ALPHA_TEST);
719−
722+ if (mode == SHADOW_RENDER_MODE) {
723+ GLBATCH(glDisable)(GL_ALPHA_TEST);
724+ }
720725 if (mode == SHADOW_RENDER_MODE) {
721726 GLBATCH(glAlphaFunc)(GL_EQUAL, 0.0f);
722727 }