X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture.cpp;h=fd14458553417d2b5d2b0dc71d036e2434f9efbf;hp=004d78c2abc38d1b9bc383b361cefae647b8ac06;hb=0221e39a685c4f3122a0fae032a7888b5ce40579;hpb=55dbeb5e04516699b8415104e346243d5e4c48c9 diff --git a/source/texture.cpp b/source/texture.cpp index 004d78c2..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