Load cameras and shuffle about model stuff
[opengl.git] / skybox.cpp
index 5c510e5863766043e29f0f17a59d813abdf03083..3bf5f40ed679346a5babbc1f3190451f2976c925 100644 (file)
@@ -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);