From 551b160b816cdfa446de800140aa1c7aef352b19 Mon Sep 17 00:00:00 2001 From: Sebastian Park Date: Sun, 5 May 2024 02:41:56 -0400 Subject: Get FBOs working. --- src/graphics/shape.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/graphics/shape.cpp') diff --git a/src/graphics/shape.cpp b/src/graphics/shape.cpp index 07af24a..980f1da 100644 --- a/src/graphics/shape.cpp +++ b/src/graphics/shape.cpp @@ -138,11 +138,13 @@ void Shape::draw(Shader *shader, GLenum mode) // Not that one texture is overwriting the other, because if we just load sky it doesn't work // Draws whatever is bound to texture0 no matter what. // Drawing the ground texture. + /* glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_ground_texture); // glBindTexture(GL_TEXTURE_2D, 0); shader->setUniform("groundSampler", 0); glUniform1i(glGetUniformLocation(shader->id(), "groundSampler"), 0); + */ // https://stackoverflow.com/questions/67277087/opengl-glsl-multiple-texture-binding-not-working // FIGURED OUT THE PROBLEM. it was that SAMPLERS WERE DEFAULTING TO SLOT 0 AND SETUNIFORM WASN'T WORKING -- cgit v1.2.3-70-g09d2