]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Allow texture mipmap levels to be specified in datafiles
[libs/gl.git] / source / texture2d.cpp
index abdfe0d1569ca50d7f06e15531e5e01997cb47bc..72c84428ab6115ec4823a62d0264e0e21e989886 100644 (file)
@@ -210,6 +210,7 @@ void Texture2D::Loader::init()
 {
        add("raw_data", &Loader::raw_data);
        add("storage", &Loader::storage);
+       add("storage", &Loader::storage_levels);
 }
 
 void Texture2D::Loader::raw_data(const string &data)
@@ -222,6 +223,11 @@ void Texture2D::Loader::storage(PixelFormat fmt, unsigned w, unsigned h)
        obj.storage(fmt, w, h);
 }
 
+void Texture2D::Loader::storage_levels(PixelFormat fmt, unsigned w, unsigned h, unsigned l)
+{
+       obj.storage(fmt, w, h, l);
+}
+
 
 Texture2D::AsyncLoader::AsyncLoader(Texture2D &t, IO::Seekable &i):
        texture(t),