From 37676b72becb3b05b44f491c8bdcd5381d458075 Mon Sep 17 00:00:00 2001 From: Migdyn Date: Sun, 30 Oct 2022 17:13:18 -0400 Subject: [PATCH] Swapped the sign on front and back faces so that they render correctly again --- XtreemNodes.depend | 4 ++-- include/NodeRenderer.h | 4 ++-- main.cpp | 9 ++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/XtreemNodes.depend b/XtreemNodes.depend index 9858aa3..ed46780 100644 --- a/XtreemNodes.depend +++ b/XtreemNodes.depend @@ -1,5 +1,5 @@ # depslib dependency file v1.0 -1667160902 source:c:\development\xtreemminer\main.cpp +1667164139 source:c:\development\xtreemminer\main.cpp "Utilities.h" @@ -12,7 +12,7 @@ "FastNoiseLite.h" -1667163770 c:\development\xtreemminer\include\noderenderer.h +1667164197 c:\development\xtreemminer\include\noderenderer.h "Base.h" "MapBlock.h" diff --git a/include/NodeRenderer.h b/include/NodeRenderer.h index 235d02d..cf3f259 100644 --- a/include/NodeRenderer.h +++ b/include/NodeRenderer.h @@ -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); diff --git a/main.cpp b/main.cpp index e6119fb..4bc2687 100644 --- a/main.cpp +++ b/main.cpp @@ -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)); /*