case RGBA16F:
case RGBA32F: return RGBA;
case SRGB8_ALPHA8: return SRGB_ALPHA;
- case LUMINANCE8: return LUMINANCE;
- case LUMINANCE8_ALPHA8: return LUMINANCE_ALPHA;
case DEPTH_COMPONENT16:
case DEPTH_COMPONENT24:
case DEPTH_COMPONENT32:
case RGBA: return RGBA8;
case SRGB: return SRGB8;
case SRGB_ALPHA: return SRGB8_ALPHA8;
- case LUMINANCE: return LUMINANCE8;
- case LUMINANCE_ALPHA: return LUMINANCE8_ALPHA8;
default: throw invalid_argument("get_sized_pixelformat");
}
case 2:
case RGBA8:
case SRGB8:
case SRGB8_ALPHA8:
- case LUMINANCE8:
- case LUMINANCE8_ALPHA8:
return 1;
case R16F:
case RG16F:
BGR = GL_BGR,
BGRA = GL_BGRA,
LUMINANCE = GL_LUMINANCE,
- LUMINANCE8 = GL_LUMINANCE8,
- LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
- LUMINANCE8_ALPHA8 = GL_LUMINANCE8_ALPHA8
+ LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA
};
void operator>>(const LexicalConverter &, PixelFormat &);
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;