]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texturecube.cpp
Completely hide OpenGL from the public headers
[libs/gl.git] / source / core / texturecube.cpp
index 2a15eb1bec3359a3f665e4d48c4f62392644b41f..6239688cb304d66a381298d8057d4c9d3330a046 100644 (file)
@@ -126,9 +126,7 @@ void TextureCube::image(TextureCubeFace face, const Graphics::Image &img)
        if(w!=h)
                throw incompatible_data("TextureCube::image");
 
-       PixelFormat fmt = pixelformat_from_image(img);
-       storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w);
-
+       storage(pixelformat_from_image(img, use_srgb_format), w);
        image(face, 0, img.get_pixels());
 }
 
@@ -141,9 +139,8 @@ void TextureCube::image(const Graphics::Image &img, unsigned lv)
                throw incompatible_data("TextureCube::image");
        h /= 6;
 
-       PixelFormat fmt = pixelformat_from_image(img);
        if(size==0)
-               storage(make_pixelformat(get_components(fmt), get_component_type(fmt), use_srgb_format), w, lv);
+               storage(pixelformat_from_image(img, use_srgb_format), w, lv);
        else if(w!=size || h!=size)
                throw incompatible_data("TextureCube::image");
 
@@ -251,7 +248,7 @@ void TextureCube::Loader::storage_levels(PixelFormat fmt, unsigned s, unsigned l
 }
 
 
-GLenum get_gl_cube_face(TextureCubeFace face)
+unsigned get_gl_cube_face(TextureCubeFace face)
 {
        switch(face)
        {