X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture.cpp;h=fd14458553417d2b5d2b0dc71d036e2434f9efbf;hb=4a577ddc946bd279d7bc4942a2ce4c46c7ef5d35;hp=97a73d9e6f59c81b3f8ca5f85f55219a02476da7;hpb=93fa68debcd6e416a1b20f43077f7a79525aaecb;p=libs%2Fgl.git diff --git a/source/texture.cpp b/source/texture.cpp index 97a73d9e..fd144585 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -78,7 +78,7 @@ Texture::~Texture() DataType Texture::get_alloc_type(PixelFormat fmt) { - return (fmt==DEPTH_COMPONENT ? UNSIGNED_SHORT : UNSIGNED_BYTE); + return (get_base_pixelformat(fmt)==DEPTH_COMPONENT ? UNSIGNED_SHORT : UNSIGNED_BYTE); } void Texture::update_parameter(int mask) const @@ -290,10 +290,10 @@ void Texture::Loader::init() add("external_image", &Loader::external_image); add("filter", &Loader::filter); - add("max_anisotropy", &Loader::max_anisotropy); add("generate_mipmap", &Loader::generate_mipmap); add("image_data", &Loader::image_data); add("mag_filter", &Loader::mag_filter); + add("max_anisotropy", &Loader::max_anisotropy); add("min_filter", &Loader::min_filter); add("wrap", &Loader::wrap); add("wrap_r", &Loader::wrap_r);