]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texturecube.cpp
Check the relevant extensions when using pixel formats
[libs/gl.git] / source / texturecube.cpp
index ddb0c1e05189113257d55d94656e1c4391fa3fa9..a5874a6a66bbe9c64cbbec58e7e1477761c5e8e7 100644 (file)
@@ -1,6 +1,6 @@
+#include "arb_texture_cube_map.h"
 #include "bindable.h"
 #include "error.h"
-#include "extension.h"
 #include "texturecube.h"
 
 using namespace std;
@@ -23,7 +23,7 @@ TextureCube::TextureCube():
        size(0),
        allocated(0)
 {
-       static RequireVersion _ver(1, 3);
+       static Require _req(ARB_texture_cube_map);
 }
 
 void TextureCube::storage(PixelFormat fmt, unsigned sz)
@@ -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;