diff --git a/src/1.getting_started/4.1.textures/textures.cpp b/src/1.getting_started/4.1.textures/textures.cpp index 6752e89..1605f20 100644 --- a/src/1.getting_started/4.1.textures/textures.cpp +++ b/src/1.getting_started/4.1.textures/textures.cpp @@ -97,7 +97,7 @@ int main() glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); // set texture wrapping to GL_REPEAT (default wrapping method) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); // set texture filtering parameters - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // load image, create texture and generate mipmaps int width, height, nrChannels; @@ -169,4 +169,4 @@ void framebuffer_size_callback(GLFWwindow* window, int width, int height) // make sure the viewport matches the new window dimensions; note that width and // height will be significantly larger than specified on retina displays. glViewport(0, 0, width, height); -} \ No newline at end of file +} diff --git a/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp b/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp index 2682a96..c6d30d5 100644 --- a/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp +++ b/src/4.advanced_opengl/5.2.framebuffers_exercise1/framebuffers_exercise1.cpp @@ -250,11 +250,9 @@ int main() shader.use(); glm::mat4 model = glm::mat4(1.0f); camera.Yaw += 180.0f; // rotate the camera's yaw 180 degrees around - camera.Pitch += 180.0f; // rotate the camera's pitch 180 degrees around camera.ProcessMouseMovement(0, 0, false); // call this to make sure it updates its camera vectors, note that we disable pitch constrains for this specific case (otherwise we can't reverse camera's pitch values) glm::mat4 view = camera.GetViewMatrix(); camera.Yaw -= 180.0f; // reset it back to its original orientation - camera.Pitch -= 180.0f; camera.ProcessMouseMovement(0, 0, true); glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f); shader.setMat4("view", view); diff --git a/src/8.guest/2020/oit/weighted_blended.cpp b/src/8.guest/2020/oit/weighted_blended.cpp index 0030244..b382f37 100644 --- a/src/8.guest/2020/oit/weighted_blended.cpp +++ b/src/8.guest/2020/oit/weighted_blended.cpp @@ -273,7 +273,7 @@ int main(int argc, char* argv[]) // ----- // set render states - glDisable(GL_DEPTH); + glDisable(GL_DEPTH_TEST); glDepthMask(GL_TRUE); // enable depth writes so glClear won't ignore clearing the depth buffer glDisable(GL_BLEND); @@ -379,4 +379,4 @@ glm::mat4 calculate_model_matrix(const glm::vec3& position, const glm::vec3& rot trans = glm::scale(trans, scale); return trans; -} \ No newline at end of file +}