zmiana skyboxa

This commit is contained in:
mikgaw@st.amu.edu.pl 2024-02-22 16:37:07 +01:00
parent 3a3bf5eb4b
commit 12b505c047
23 changed files with 9 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -229,19 +229,20 @@ void init(GLFWwindow* window)
texture::asteroidNormal = Core::LoadTexture("textures/moon_normal.jpg"); texture::asteroidNormal = Core::LoadTexture("textures/moon_normal.jpg");
//tutaj skybox //tutaj skybox start
glGenTextures(1, &textureID); glGenTextures(1, &textureID);
glBindTexture(GL_TEXTURE_CUBE_MAP, textureID); glBindTexture(GL_TEXTURE_CUBE_MAP, textureID);
std::vector<std::string> filepaths = { std::vector<std::string> filepaths = {
"textures/skybox/space_rt.png", "textures/skybox/right.png",
"textures/skybox/space_lf.png", "textures/skybox/left.png",
"textures/skybox/space_up.png", "textures/skybox/top.png",
"textures/skybox/space_dn.png", "textures/skybox/bottaom.png",
"textures/skybox/space_bk.png", "textures/skybox/back.png",
"textures/skybox/space_ft.png" "textures/skybox/front.png"
}; };
int w, h; int w, h;
unsigned char* data; unsigned char* data;
for (unsigned int i = 0; i < 6; i++) for (unsigned int i = 0; i < 6; i++)
@ -258,6 +259,7 @@ void init(GLFWwindow* window)
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
//skybox end
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 KiB