]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture.cpp
Remove sized L and LA pixel formats
[libs/gl.git] / source / texture.cpp
index a7e4898c1edae7d73de8efe9bf425dbb69ccc569..1452cfbb44c3afe099a444cdb44d557015061051 100644 (file)
@@ -97,24 +97,24 @@ DataType Texture::get_alloc_type(PixelFormat fmt)
 
 void Texture::set_internal_format(PixelFormat fmt)
 {
-       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)
        {
-               if(fmt==LUMINANCE8)
+               if(fmt==LUMINANCE)
                {
-                       fmt = R8;
+                       fmt = RED;
                        swiz = R_TO_LUMINANCE;
                }
-               else if(fmt==LUMINANCE8_ALPHA8)
+               else if(fmt==LUMINANCE_ALPHA)
                {
-                       fmt = RG8;
+                       fmt = RG;
                        swiz = RG_TO_LUMINANCE_ALPHA;
                }
        }
 
+       if(!get_component_size(fmt) && OES_required_internalformat)
+               fmt = get_default_sized_pixelformat(fmt);
+
        require_pixelformat(fmt);
        ifmt = fmt;
        swizzle = swiz;