From 85e2ef8c9d7cdb24715a7375e149d5d1e7d580b1 Mon Sep 17 00:00:00 2001 From: Sebastian Park Date: Mon, 6 May 2024 02:15:49 -0400 Subject: change clear colors and set input name from color to normal. --- CMakeLists.txt.user | 2 +- resources/shaders/color.vert | 4 ++-- src/glwidget.cpp | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user index 9cfaad8..bc65141 100644 --- a/CMakeLists.txt.user +++ b/CMakeLists.txt.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/resources/shaders/color.vert b/resources/shaders/color.vert index d449122..6aa941e 100644 --- a/resources/shaders/color.vert +++ b/resources/shaders/color.vert @@ -1,10 +1,10 @@ #version 330 core layout (location = 0) in vec3 position; -layout (location = 1) in vec3 color; +layout (location = 1) in vec3 normal; out vec3 col; void main() { gl_Position = vec4(position, 1.0); - col = color; + col = normal; } diff --git a/src/glwidget.cpp b/src/glwidget.cpp index c13d476..06461d0 100755 --- a/src/glwidget.cpp +++ b/src/glwidget.cpp @@ -64,7 +64,7 @@ void GLWidget::initializeGL() fprintf(stdout, "Successfully initialized GLEW %s\n", glewGetString(GLEW_VERSION)); // Set clear color to white - glClearColor(0, 0, 0, 1); + glClearColor(1, 0.98f, 0.85f, 1); // Enable depth-testing and backface culling glEnable(GL_DEPTH_TEST); @@ -168,6 +168,8 @@ void GLWidget::initializeGL() } void GLWidget::paintCaustics() { + glClearColor(0.68f, 0.58f, 0.38f, 1); + glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); // Task 15: Clear the screen here @@ -303,6 +305,7 @@ void GLWidget::makeFBO() { void GLWidget::paintGL() { paintCaustics(); + glClearColor(0.56f, 0.69f, 0.74f, 1); glBindFramebuffer(GL_FRAMEBUFFER, m_defaultFBO); // return; // paintTexture(m_ground_texture, false); -- cgit v1.2.3-70-g09d2