From 4198516138da4496f34ab60afe9f599ae809ecc4 Mon Sep 17 00:00:00 2001 From: Ozan Onay Date: Sun, 3 Jul 2016 08:23:53 -0700 Subject: [PATCH 1/4] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5db32f2..8e0f554 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Running `ls $LOGL_ROOT_PATH` should list, among other things, this README file a ## Mac OS X building Thanks to Stéphane le Boeuf, a Github fork was set up that successfully compiles on Mac OSX (and Linux as well); current CMake hasn't been adapted for Mac OSX yet. The following command lines build the projects on Mac OSX: ``` -git clone --recursive [https://github.com/stephane-lb/LearnOpenGL.git +git clone --recursive https://github.com/stephane-lb/LearnOpenGL.git cd LearnOpenGL mkdir build cd build From a1638ea19a5902da5e68a88116fd9e64697966a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Drahom=C3=ADr=20Han=C3=A1k?= Date: Wed, 6 Jul 2016 15:09:56 +0200 Subject: [PATCH 2/4] Fix switching draw mode in SSAO deferred shader --- src/5.advanced_lighting/9.ssao/ssao_lighting.frag | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/5.advanced_lighting/9.ssao/ssao_lighting.frag b/src/5.advanced_lighting/9.ssao/ssao_lighting.frag index afd5332..fe97b41 100644 --- a/src/5.advanced_lighting/9.ssao/ssao_lighting.frag +++ b/src/5.advanced_lighting/9.ssao/ssao_lighting.frag @@ -52,8 +52,8 @@ void main() FragColor = vec4(vec3(Depth / 50.0), 1.0); else if(draw_mode == 3) FragColor = vec4(FragPos, 1.0); - else if(draw_mode == 3) + else if(draw_mode == 4) FragColor = vec4(Normal, 1.0); - else if(draw_mode == 4) + else if(draw_mode == 5) FragColor = vec4(vec3(AmbientOcclusion), 1.0); } From 8baa9bf99e7e264fb08be1b2ab570149ff0b7567 Mon Sep 17 00:00:00 2001 From: txf Date: Thu, 25 Aug 2016 15:16:46 +0800 Subject: [PATCH 3/4] Fixed bug: cannot load images in vs2015. --- .../6.cubemaps/cubemaps_skybox_optimized.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/4.advanced_opengl/6.cubemaps/cubemaps_skybox_optimized.cpp b/src/4.advanced_opengl/6.cubemaps/cubemaps_skybox_optimized.cpp index 9b1fd6f..99db806 100644 --- a/src/4.advanced_opengl/6.cubemaps/cubemaps_skybox_optimized.cpp +++ b/src/4.advanced_opengl/6.cubemaps/cubemaps_skybox_optimized.cpp @@ -32,7 +32,7 @@ void scroll_callback(GLFWwindow* window, double xoffset, double yoffset); void mouse_callback(GLFWwindow* window, double xpos, double ypos); void Do_Movement(); GLuint loadTexture(GLchar const * path); -GLuint loadCubemap(std::vector faces); +GLuint loadCubemap(std::vector faces); // Camera Camera camera(glm::vec3(0.0f, 0.0f, 3.0f)); @@ -198,13 +198,13 @@ int main() #pragma endregion // Cubemap (Skybox) - std::vector faces; - faces.push_back(FileSystem::getPath("resources/textures/skybox/right.jpg").c_str()); - faces.push_back(FileSystem::getPath("resources/textures/skybox/left.jpg").c_str()); - faces.push_back(FileSystem::getPath("resources/textures/skybox/top.jpg").c_str()); - faces.push_back(FileSystem::getPath("resources/textures/skybox/bottom.jpg").c_str()); - faces.push_back(FileSystem::getPath("resources/textures/skybox/back.jpg").c_str()); - faces.push_back(FileSystem::getPath("resources/textures/skybox/front.jpg").c_str()); + std::vector faces; + faces.push_back(FileSystem::getPath("resources/textures/skybox/right.jpg")); + faces.push_back(FileSystem::getPath("resources/textures/skybox/left.jpg")); + faces.push_back(FileSystem::getPath("resources/textures/skybox/top.jpg")); + faces.push_back(FileSystem::getPath("resources/textures/skybox/bottom.jpg")); + faces.push_back(FileSystem::getPath("resources/textures/skybox/back.jpg")); + faces.push_back(FileSystem::getPath("resources/textures/skybox/front.jpg")); GLuint skyboxTexture = loadCubemap(faces); // Draw as wireframe @@ -272,7 +272,7 @@ int main() // -Y (bottom) // +Z (front)? (CHECK THIS) // -Z (back)? -GLuint loadCubemap(std::vector faces) +GLuint loadCubemap(std::vector faces) { GLuint textureID; glGenTextures(1, &textureID); @@ -284,7 +284,7 @@ GLuint loadCubemap(std::vector faces) glBindTexture(GL_TEXTURE_CUBE_MAP, textureID); for (GLuint i = 0; i < faces.size(); i++) { - image = SOIL_load_image(faces[i], &width, &height, 0, SOIL_LOAD_RGB); + image = SOIL_load_image(faces[i].c_str(), &width, &height, 0, SOIL_LOAD_RGB); glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, image); } glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); From d3d808f9d93a6768e9a8bd03d753e4e912f051c7 Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 14 Sep 2016 12:47:40 -0700 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e0f554..783e202 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Using root (sudo) and type `apt-get install libsoil-dev libglm-dev libassimp-dev Note that CodeBlocks or other IDEs may have issues running the programs due to problems finding the shader and resource files, however it should still be able to generate the exectuables. To work around this problem it is possible to set an environment variable to tell the tutorials where the resource files can be found. The environment variable is named LOGL_ROOT_PATH and may be set to the path to the root of the LearnOpenGL directory tree. For example: - `export LOGL_ROOT_PATH=/home/user/tutorials/LearmOpenGL` + `export LOGL_ROOT_PATH=/home/user/tutorials/LearnOpenGL` Running `ls $LOGL_ROOT_PATH` should list, among other things, this README file and the resources direcory.