voxel meshes perhaps

This commit is contained in:
Ben
2021-03-02 17:42:24 +00:00
parent 9f9daa3a6e
commit 6e42ac9e8b
5 changed files with 28 additions and 4 deletions

View File

@@ -15,8 +15,10 @@ public:
Mesh();
private:
GLuint mVAO;
GLuint mVBO;
};

View File

@@ -35,8 +35,6 @@ private:
std::vector<Mesh*> mMeshs;
Mesh* mActiveMesh;
GLuint mActiveVAO;
GLuint mActiveVBO;
// Meshes have uniform uniforms
GLuint mUBO;

View File

@@ -5,6 +5,7 @@
* Renderer Structure
*
* Mesh -> Renderable
* Mesh -> VoxelMesh
* Renderable -> Model
* Renderable -> World (static(?))
* Renderable -> Entity (dynamic)

View File

@@ -0,0 +1,23 @@
#ifndef MINECRAFT_RENDERER_VOXELMESH_H_
#define MINECRAFT_RENDERER_VOXELMESH_H_
#include "mesh.hpp"
class VoxelMesh : public Mesh
{
public:
VoxelMesh();
int Width;
int Height;
int Depth;
// Size is w*h*d
std::vector<uint8_t> Voxels;
};
#endif

View File

@@ -29,7 +29,7 @@ void version()
{
std::stringstream version;
auto& container = []( std::string s ) { std::string r = ""; for ( auto& c : s ) { r += "-"; } return r; };
const auto& container = []( std::string s ) { std::string r = ""; for ( auto& c : s ) { r += "-"; } return r; };
version << "Minecraft ";
version << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_PATCH;