]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.cpp
Add a get_default_sized_pixelformat function
[libs/gl.git] / source / texture.cpp
index 185ed7feea582b53194e7a7a61183845b576f065..a8b2f6d0db3e243a05548e6f452ae8d71fd015f8 100644 (file)
@@ -95,11 +95,8 @@ DataType Texture::get_alloc_type(PixelFormat fmt)
 
 void Texture::set_internal_format(PixelFormat fmt)
 {
-       if(!get_component_size(fmt) && MSP_sized_internal_formats)
-       {
-               unsigned size = (fmt==DEPTH_COMPONENT ? get_gl_api()==OPENGL_ES2 ? 2 : 4 : 1);
-               fmt = get_sized_pixelformat(fmt, size);
-       }
+       if(!get_component_size(fmt) && OES_required_internalformat)
+               fmt = get_default_sized_pixelformat(fmt);
 
        FormatSwizzle swiz = NO_SWIZZLE;
        if(ARB_texture_rg && ARB_texture_swizzle)