X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=skybox.cpp;h=3bf5f40ed679346a5babbc1f3190451f2976c925;hp=5c510e5863766043e29f0f17a59d813abdf03083;hb=b75b26b3081207cd4169f2ac50875e35d19b8a14;hpb=511a2c92fcb9dda82dd5d38b91ea03790d0cb7b2 diff --git a/skybox.cpp b/skybox.cpp index 5c510e5..3bf5f40 100644 --- a/skybox.cpp +++ b/skybox.cpp @@ -95,7 +95,7 @@ Skybox::Skybox(const Image img): program("skyboxvert.glsl", "skyboxfrag.glsl") { glBindTexture(GL_TEXTURE_2D, hdrTexId); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16, img.width(), img.height(), 0, GL_RGB, GL_UNSIGNED_SHORT, (unsigned short*)img.data()); + glTexImage2D(GL_TEXTURE_2D, 0, img.internalFormat(), img.width(), img.height(), 0, img.format(), img.type(), img.data()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);