voxel meshes perhaps
This commit is contained in:
@@ -15,8 +15,10 @@ public:
|
||||
|
||||
Mesh();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
GLuint mVAO;
|
||||
GLuint mVBO;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@ private:
|
||||
std::vector<Mesh*> mMeshs;
|
||||
Mesh* mActiveMesh;
|
||||
|
||||
GLuint mActiveVAO;
|
||||
GLuint mActiveVBO;
|
||||
// Meshes have uniform uniforms
|
||||
GLuint mUBO;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Renderer Structure
|
||||
*
|
||||
* Mesh -> Renderable
|
||||
* Mesh -> VoxelMesh
|
||||
* Renderable -> Model
|
||||
* Renderable -> World (static(?))
|
||||
* Renderable -> Entity (dynamic)
|
||||
|
||||
23
src/Rendering/voxelmesh.hpp
Normal file
23
src/Rendering/voxelmesh.hpp
Normal 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
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user