3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-04-29 20:03:00 +02:00

push and pop the matrix for voxel system draw

This commit is contained in:
Stephen Birarda 2013-03-21 17:12:50 -07:00
parent 5f052d7c9e
commit 6712d23cd1

View file

@ -145,6 +145,8 @@ void VoxelSystem::init() {
}
void VoxelSystem::render() {
glPushMatrix();
if (voxelsToRender) {
glBindBuffer(GL_ARRAY_BUFFER, vboVerticesID);
@ -182,7 +184,7 @@ void VoxelSystem::render() {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
// scale back down to 1 so heads aren't massive
glScalef(1, 1, 1);
glPopMatrix();
}
void VoxelSystem::simulate(float deltaTime) {