These constants are not part of modern OpenGL and not supported on
OpenGL ES. The unsized formats can still be used for uploading data
and will be translated to RED and RG for use as internal format.
case RGBA16F:
case RGBA32F: return RGBA;
case SRGB8_ALPHA8: return SRGB_ALPHA;
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 DEPTH_COMPONENT16:
case DEPTH_COMPONENT24:
case DEPTH_COMPONENT32:
case RGBA: return RGBA8;
case SRGB: return SRGB8;
case SRGB_ALPHA: return SRGB8_ALPHA8;
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:
default: throw invalid_argument("get_sized_pixelformat");
}
case 2:
case RGBA8:
case SRGB8:
case SRGB8_ALPHA8:
case RGBA8:
case SRGB8:
case SRGB8_ALPHA8:
- case LUMINANCE8:
- case LUMINANCE8_ALPHA8:
return 1;
case R16F:
case RG16F:
return 1;
case R16F:
case RG16F:
BGR = GL_BGR,
BGRA = GL_BGRA,
LUMINANCE = GL_LUMINANCE,
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 operator>>(const LexicalConverter &, PixelFormat &);
void Texture::set_internal_format(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)
{
FormatSwizzle swiz = NO_SWIZZLE;
if(ARB_texture_rg && ARB_texture_swizzle)
{
- else if(fmt==LUMINANCE8_ALPHA8)
+ else if(fmt==LUMINANCE_ALPHA)
swiz = RG_TO_LUMINANCE_ALPHA;
}
}
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;
require_pixelformat(fmt);
ifmt = fmt;
swizzle = swiz;