Fixed unlit textures not drawing.

This commit is contained in:
Leonardo Zide 2017-07-08 09:44:53 -07:00
parent 3d7bfdafb0
commit 50256d5378

View file

@ -261,15 +261,15 @@ void lcScene::Draw(lcContext* Context) const
if (DrawLines) if (DrawLines)
DrawRenderMeshes(Context, LC_MESH_TEXTURED_LINES | LC_MESH_TEXTURED_TRIANGLES, false, false, false); DrawRenderMeshes(Context, LC_MESH_TEXTURED_LINES | LC_MESH_TEXTURED_TRIANGLES, false, false, false);
else
DrawRenderMeshes(Context, LC_MESH_TEXTURED_TRIANGLES, false, false, false); DrawRenderMeshes(Context, LC_MESH_TEXTURED_TRIANGLES, false, false, true);
if (!mTranslucentMeshes.IsEmpty()) if (!mTranslucentMeshes.IsEmpty())
{ {
glEnable(GL_BLEND); // todo: remove GL calls glEnable(GL_BLEND); // todo: remove GL calls
glDepthMask(GL_FALSE); glDepthMask(GL_FALSE);
DrawRenderMeshes(Context, LC_MESH_TEXTURED_TRIANGLES, false, true, false); DrawRenderMeshes(Context, LC_MESH_TEXTURED_TRIANGLES, false, true, true);
glDepthMask(GL_TRUE); glDepthMask(GL_TRUE);
glDisable(GL_BLEND); glDisable(GL_BLEND);