]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Move internal format management to the Texture base class
[libs/gl.git] / source / texture2d.cpp
index 8ecebdfb6e1748132bf39a14040f5bae8704aa33..75b84ec7bbe5747c17ee47b137ba56df33e9101e 100644 (file)
@@ -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;
 }