From 90c74c1143bd8311140b9c3fcc836de1c29549d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A4=E9=BE=99?= <68932014+12gch138@users.noreply.github.com> Date: Wed, 14 Dec 2022 19:37:57 +0800 Subject: [PATCH] =?UTF-8?q?skybox=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FinalProject/skybox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FinalProject/skybox.cpp b/FinalProject/skybox.cpp index 3242858..ba2b009 100644 --- a/FinalProject/skybox.cpp +++ b/FinalProject/skybox.cpp @@ -11,8 +11,8 @@ skybox::skybox(std::string path){ faces.clear(); faces.push_back(path + "/right.jpg"); faces.push_back(path + "/left.jpg"); - faces.push_back(path + "/top.jpg"); faces.push_back(path + "/bottom.jpg"); + faces.push_back(path + "/top.jpg"); faces.push_back(path + "/front.jpg"); faces.push_back(path + "/back.jpg"); @@ -43,6 +43,7 @@ unsigned int skybox::loadCubemap(std::vector faces) unsigned int textureID; OPENGL_FUNCTIONS->glGenTextures(1, &textureID); OPENGL_FUNCTIONS->glBindTexture(GL_TEXTURE_CUBE_MAP, textureID); + stbi_set_flip_vertically_on_load(true); int width, height, nrChannels; for (unsigned int i = 0; i < faces.size(); i++)