fix logic error unbinding shader program in the middle of an object
This commit is contained in:
1 parent
d043cf999c
commit
eed74a64f3
1 file changed
+3
-3
@@ -611,10 +611,10 @@ void Engine::Object::draw()
|
|||||||
glDrawElements(GL_TRIANGLES, m.num_vertices,
|
glDrawElements(GL_TRIANGLES, m.num_vertices,
|
||||||
GL_UNSIGNED_SHORT,
|
GL_UNSIGNED_SHORT,
|
||||||
(GLvoid *) (sizeof(GLushort) * m.first_vertex));
|
(GLvoid *) (sizeof(GLushort) * m.first_vertex));
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
|
||||||
glUseProgram(0);
|
|
||||||
}
|
}
|
||||||
|
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||||
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||||
|
glUseProgram(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkGLError();
|
checkGLError();
|
||||||
|
|||||||
Reference in new issue
Block a user