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
145}145}
146 146
147void VoxelSystem::render() {147void VoxelSystem::render() {
148
149 glPushMatrix();
148 150
149 if (voxelsToRender) {151 if (voxelsToRender) {
150 glBindBuffer(GL_ARRAY_BUFFER, vboVerticesID);152 glBindBuffer(GL_ARRAY_BUFFER, vboVerticesID);
@@ -182,7 +184,7 @@ void VoxelSystem::render() { · 31 unmodified lines
182 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);184 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
183 185
184 // scale back down to 1 so heads aren't massive186 // scale back down to 1 so heads aren't massive
185 glScalef(1, 1, 1);187 glPopMatrix();
186}188}
187 189
188void VoxelSystem::simulate(float deltaTime) {190void VoxelSystem::simulate(float deltaTime) {