mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-14 14:49:08 +02:00
push and pop the matrix for voxel system draw
This commit is contained in:
parent
5f052d7c9e
commit
6712d23cd1
1 changed files with 3 additions and 1 deletions
|
@ -146,6 +146,8 @@ void VoxelSystem::init() {
|
|||
|
||||
void VoxelSystem::render() {
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
if (voxelsToRender) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vboVerticesID);
|
||||
glBufferData(GL_ARRAY_BUFFER, VERTEX_POINTS_PER_VOXEL * sizeof(GLfloat) * MAX_VOXELS_PER_SYSTEM, NULL, GL_DYNAMIC_DRAW);
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue