X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture.cpp;h=175e76a2365688c8aef1f30592759d8addbefab1;hp=78053386a1e15e80ca2414d1d6261e19e4ac73ca;hb=260ecf71f02d4b3397e4f6c80d96a7c4ba473185;hpb=a7948dfc4192efbbf2b5ca9258fd7e72b971f8ea diff --git a/source/core/texture.cpp b/source/core/texture.cpp index 78053386..175e76a2 100644 --- a/source/core/texture.cpp +++ b/source/core/texture.cpp @@ -92,6 +92,7 @@ Texture::Loader::Loader(Texture &t, Collection *c): add("generate_mipmap", &Loader::generate_mipmap); add("image_data", &Loader::image_data); add("mipmap_levels", &Loader::mipmap_levels); + add("raw_data", &Loader::raw_data); } void Texture::Loader::finish() @@ -143,5 +144,13 @@ void Texture::Loader::mipmap_levels(unsigned l) levels = l; } +void Texture::Loader::raw_data(const string &data) +{ + if(obj.manager) + obj.set_manager(0); + + obj.image(0, data.data()); +} + } // namespace GL } // namespace Msp