+#include "arb_texture_cube_map.h"
#include "bindable.h"
#include "error.h"
-#include "extension.h"
#include "texturecube.h"
using namespace std;
size(0),
allocated(0)
{
- static RequireVersion _ver(1, 3);
+ static Require _req(ARB_texture_cube_map);
}
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;
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);