Skip to content

Commit

Permalink
Fix missing texture using previously-used texture
Browse files Browse the repository at this point in the history
  • Loading branch information
rlk committed Sep 27, 2014
1 parent fcfda28 commit 6ba280a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion obj.c
Expand Up @@ -2165,6 +2165,7 @@ static void obj_render_prop(const obj *O, int mi, int ki)
glUniformMatrix4fv(O->Mloc[ki], 1, GL_FALSE, T);
}
}
else glBindTexture(GL_TEXTURE_2D, 0);
}

void obj_render_mtrl(const obj *O, int mi)
Expand All @@ -2175,7 +2176,7 @@ void obj_render_mtrl(const obj *O, int mi)

for (ki = 0; ki < OBJ_PROP_COUNT; ki++)
{
if (O->oloc[ki] >= 0 && obj_get_mtrl_map(O, mi, ki))
if (O->oloc[ki] >= 0)
{
glActiveTexture(GL_TEXTURE0 + ki);
obj_render_prop(O, mi, ki);
Expand Down

0 comments on commit 6ba280a

Please sign in to comment.