Les vertices entre les Chunks ne sont plus dessinées!

This commit is contained in:
MarcEricMartel
2021-11-18 19:27:16 -05:00
parent 9745e8f60b
commit 592cb5c4f8
8 changed files with 38 additions and 29 deletions

View File

@@ -5,6 +5,9 @@
#include "array2d.h"
#include "vertexbuffer.h"
#include "blockinfo.h"
#include "world.h"
class World;
class Chunk {
private:
@@ -15,7 +18,7 @@ class Chunk {
int m_posX; // Position du chunk dans l'array constituant le monde.
int m_posY;
void AddBlockToMesh(VertexBuffer::VertexData* vd, int& count, BlockType bt, int x, int y, int z, float u, float v, float s);
void AddBlockToMesh(VertexBuffer::VertexData* vd, int& count, BlockType bt, int x, int y, int z, float u, float v, float s, World* world);
public:
Chunk(int x, int y);
@@ -25,7 +28,7 @@ class Chunk {
void SetBlock(int x, int y, int z, BlockType type);
BlockType GetBlock(int x, int y, int z);
void Update(BlockInfo* blockinfo[BTYPE_LAST]);
void Update(BlockInfo* blockinfo[BTYPE_LAST], World* world);
void Render() const;
bool IsDirty() const;