]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.cpp
Pull in sized depth component formats from ARB_depth_texture
[libs/gl.git] / source / texture.cpp
index 004d78c2abc38d1b9bc383b361cefae647b8ac06..fd14458553417d2b5d2b0dc71d036e2434f9efbf 100644 (file)
@@ -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