Swapped the sign on front and back faces so that they render correctly again

This commit is contained in:
Functioning Member of Society 2022-10-30 17:13:18 -04:00
parent a0bec8bfc5
commit 37676b72be
3 changed files with 8 additions and 9 deletions

View File

@ -1,5 +1,5 @@
# depslib dependency file v1.0
1667160902 source:c:\development\xtreemminer\main.cpp
1667164139 source:c:\development\xtreemminer\main.cpp
<stdlib.h>
<GL/glut.h>
"Utilities.h"
@ -12,7 +12,7 @@
"FastNoiseLite.h"
<random>
1667163770 c:\development\xtreemminer\include\noderenderer.h
1667164197 c:\development\xtreemminer\include\noderenderer.h
"Base.h"
"MapBlock.h"
<GL/glut.h>

View File

@ -25,7 +25,7 @@ class NodeRenderer
glBegin(GL_QUADS);
// Front
if(blockManager.isAir(x, y, z + 1))
if(blockManager.isAir(x, y, z - 1))
{
glTexCoord2f(.0F, .0F);
glVertex3f(x + .0F, y + 1.0F, z + .0F);
@ -43,7 +43,7 @@ class NodeRenderer
}
// Back
if(blockManager.isAir(x, y, z - 1))
if(blockManager.isAir(x, y, z + 1))
{
glTexCoord2f(.0F, .0F);

View File

@ -43,11 +43,11 @@ void display()
glBegin(GL_QUADS);
for(int x = 0; x < 16; x++)
for(int x = 0; x < 64; x++)
{
for(int y = 0; y < 64; y++)
{
for(int z = 0; z < 16; z++)
for(int z = 0; z < 64; z++)
{
@ -197,9 +197,9 @@ int main(int argc, char **argv)
cellular.SetNoiseType(FastNoiseLite::NoiseType_Cellular);
cellular.SetFrequency(.1F);
for(int bx = 0; bx < 1; bx++)
for(int bx = 0; bx < 4; bx++)
{
for(int bz = 0; bz < 1; bz++)
for(int bz = 0; bz < 4; bz++)
{
for(int x = 0; x < 16; x++)
{
@ -216,7 +216,6 @@ int main(int argc, char **argv)
}
}
printf("\n0, 2, 0: %i", blockManager.isAir(0, 1, 0));
/*