Maintenant je comprend les singes au début de 2001 A Space Odyssey
This commit is contained in:
@@ -7,6 +7,32 @@ Renderer::Renderer() {
|
||||
Renderer::~Renderer() {
|
||||
}
|
||||
|
||||
void Renderer::RemoveChunk(int nbReduit)
|
||||
{
|
||||
for (int x = 0; x < WORLD_SIZE_X; ++x)
|
||||
for (int y = 0; y < WORLD_SIZE_Y; ++y)
|
||||
{
|
||||
Mesh* chk = nullptr;
|
||||
if (x < nbReduit)
|
||||
chk = m_meshes.Remove(x, y);
|
||||
if (y < nbReduit)
|
||||
chk = m_meshes.Remove(x, y);
|
||||
if (y > WORLD_SIZE_Y - nbReduit)
|
||||
chk = m_meshes.Remove(x, y);
|
||||
if (x > WORLD_SIZE_X - nbReduit)
|
||||
chk = m_meshes.Remove(x, y);
|
||||
|
||||
// TODO: MakeDirty() les voisins pour qu'ils se redessinent.
|
||||
|
||||
if (!chk)
|
||||
continue;
|
||||
|
||||
delete chk;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Renderer::RenderWorld(World* origin, int& rendercount, const Vector3f& player_pos, const Vector3f& player_dir, Transformation& world, Shader& shader, TextureAtlas& atlas) const {
|
||||
rendercount = 0;
|
||||
Vector3f angle;
|
||||
|
Reference in New Issue
Block a user