]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturecube.cpp
Rename the matrix reference version of uniform_matrix4 to uniform
[libs/gl.git] / source / texturecube.cpp
index bbe6a6b679fe259915e6710036ed75336634816e..6935e582f5932cd7c000d844c56c976f2c47b0e9 100644 (file)
@@ -32,6 +32,7 @@ void TextureCube::storage(PixelFormat fmt, unsigned sz)
                throw invalid_operation("TextureCube::storage");
        if(sz==0)
                throw invalid_argument("TextureCube::storage");
+       require_pixelformat(fmt);
 
        ifmt = fmt;
        size = sz;
@@ -53,7 +54,7 @@ void TextureCube::image(TextureCubeFace face, unsigned level, PixelFormat fmt, D
 
        unsigned s = get_level_size(level);
        if(s==0)
-               throw invalid_argument("TextureCube::image");
+               throw out_of_range("TextureCube::image");
 
        Bind _bind(this, true);
        glTexImage2D(face, level, ifmt, s, s, 0, fmt, type, data);