X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=75b84ec7bbe5747c17ee47b137ba56df33e9101e;hb=21eaad595acb574d81bad5140d24b570da4f9785;hp=8ecebdfb6e1748132bf39a14040f5bae8704aa33;hpb=08e19bc2b4eba572bc7699378cf55cd8772ac67e;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 8ecebdfb..75b84ec7 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -36,7 +36,6 @@ public: Texture2D::Texture2D(ResourceManager *m): Texture(GL_TEXTURE_2D, m), - ifmt(RGB), width(0), height(0), allocated(0) @@ -54,11 +53,7 @@ void Texture2D::storage(PixelFormat fmt, unsigned wd, unsigned ht) if(wd==0 || ht==0) throw invalid_argument("Texture2D::storage"); - if(MSP_sized_internal_formats) - fmt = get_sized_pixelformat(fmt); - require_pixelformat(fmt); - - ifmt = fmt; + set_internal_format(fmt); width = wd; height = ht; }