aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.hpp
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-14 03:31:40 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-09-14 03:31:40 -0400
commit534f6f57e930020eb1ad726f4de4e90cf487e584 (patch)
tree0dedd0deaa7556e6f9e8fd316017413f59de7996 /src/world.hpp
parent4bf539d953871dbddddcc00275ffdcaddece5091 (diff)
World can now draw
Diffstat (limited to 'src/world.hpp')
-rw-r--r--src/world.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/world.hpp b/src/world.hpp
index 81e5b9d..5933306 100644
--- a/src/world.hpp
+++ b/src/world.hpp
@@ -33,7 +33,7 @@ struct WorldMeshData
float posX, posY, posZ;
float texX, texY;
float transparency;
-};
+}__attribute__((packed));
struct WorldMaterial
{
@@ -100,6 +100,9 @@ public:
/* RENDERING */
void generateMesh();
+ std::basic_string<WorldMeshData>& getMesh() {return mesh;}
+ GLuint getTexture() {return registry.at(0).texture.tex;}
+ GLuint getNormal() {return registry.at(0).normal.tex;};
/* SEED */
unsigned int getSeed();
@@ -125,6 +128,7 @@ public:
}
World* addWorld(sol::object);
+ World* current() {return currentWorld;};
void cleanup()
{
worlds.clear();