History

push and pop the matrix for voxel system draw

Stephen Birarda committed 13 years ago

Commit 6712d231 parent 5f052d71 file · +3 −1Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/VoxelSystem.cpp+3−1
@@ -145,6 +145,8 @@ void VoxelSystem::init() { · 144 unmodified lines
145145 }
146146
147147 void VoxelSystem::render() {
148+
149+ glPushMatrix();
148150
149151 if (voxelsToRender) {
150152 glBindBuffer(GL_ARRAY_BUFFER, vboVerticesID);
@@ -182,7 +184,7 @@ void VoxelSystem::render() { · 31 unmodified lines
182184 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
183185
184186 // scale back down to 1 so heads aren't massive
185− glScalef(1, 1, 1);
187+ glPopMatrix();
186188 }
187189
188190 void VoxelSystem::simulate(float deltaTime) {