This commit is contained in:
MarcEricMartel
2021-12-06 11:08:34 -05:00
parent 29a383f47f
commit ad9bcac7d2
4 changed files with 9 additions and 12 deletions

View File

@@ -107,11 +107,14 @@ void World::GetScope(int& x, int& y) {
}
void World::Update(int& rendercount, int& badhitcount, Player& player, Transformation& world, Shader& shader, TextureAtlas& atlas, Perlin& perlin, BlockInfo* blockinfo[BTYPE_LAST]) {
glStencilFunc(GL_EQUAL, 1, 0x00);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
atlas.Bind();
RenderWorld(rendercount, badhitcount, player, world, shader);
TransposeWorld(player);
UpdateWorld(player, perlin, blockinfo);
shader.Disable();
glStencilFunc(GL_GREATER, 1, 0xFF);
}
bool World::GenerateChunk(int chx, int chy, Perlin& perlin) {