X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=b8f2f26b7076320f78f5ef792dc69a9acd7e1b82;hp=baee22eefc56b31f9fe41c44c53a888598c3cbba;hb=a5797c9babd17673285b3b15c7572c2d8fe1595c;hpb=d23880571efc16dff1cfeeb92f35fe54c8f64c3d diff --git a/source/texture2d.cpp b/source/texture2d.cpp index baee22ee..b8f2f26b 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -6,7 +6,6 @@ Distributed under the LGPL */ #include "except.h" -#include "ilwrap.h" #include "texture2d.h" using namespace std; @@ -57,17 +56,17 @@ void Texture2D::sub_image(int level, int x, int y, sizei wd, sizei ht, PixelForm void Texture2D::load_image(const string &fn) { - Image img; + Graphics::Image img; img.load_file(fn); image(img); } -void Texture2D::image(const Image &img) +void Texture2D::image(const Graphics::Image &img) { unsigned w=img.get_width(); unsigned h=img.get_height(); - PixelFormat fmt=img.get_format(); + PixelFormat fmt=pixelformat_from_graphics(img.get_format()); if(width==0) storage(fmt, w, h, 0); else if(w!=width || h!=height) @@ -87,8 +86,8 @@ Texture2D::Loader::Loader(Texture2D &t): void Texture2D::Loader::image_data(const string &data) { - Image img; - img.load_lump(data.data(), data.size()); + Graphics::Image img; + img.load_memory(data.data(), data.size()); static_cast(tex).image(img); }