X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexturecube.cpp;h=6935e582f5932cd7c000d844c56c976f2c47b0e9;hb=c4fa55619539de9045167250d5b1c13d1827cf7a;hp=bbe6a6b679fe259915e6710036ed75336634816e;hpb=6afbace895a7bbcf216ab8e48280ea0303ab5892;p=libs%2Fgl.git diff --git a/source/texturecube.cpp b/source/texturecube.cpp index bbe6a6b6..6935e582 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -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);