X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexturecube.cpp;h=277cba6df35b821d4119060dc83ed64be1dc886c;hb=33b6ca811172d402fc891eeed9cd2a5edc28d61d;hp=4984985c807489b28d6f5737c2f2ba03286488d3;hpb=9b3bce7ae76ff8c0c81315d2505ea96bf422a318;p=libs%2Fgl.git diff --git a/source/core/texturecube.cpp b/source/core/texturecube.cpp index 4984985c..277cba6d 100644 --- a/source/core/texturecube.cpp +++ b/source/core/texturecube.cpp @@ -5,9 +5,7 @@ #include #include #include -#include "bindable.h" #include "error.h" -#include "pixelstore.h" #include "texturecube.h" using namespace std; @@ -99,10 +97,11 @@ void TextureCube::allocate_(unsigned level) { if(ARB_texture_storage) { + GLenum fmt = get_gl_pixelformat(storage_fmt); if(ARB_direct_state_access) - glTextureStorage2D(id, levels, storage_fmt, size, size); + glTextureStorage2D(id, levels, fmt, size, size); else - glTexStorage2D(target, levels, storage_fmt, size, size); + glTexStorage2D(target, levels, fmt, size, size); apply_swizzle(); allocated |= (64<(img.get_pixels()); unsigned face_size = img.get_stride()*size; for(unsigned i=0; i<6; ++i)