gles2: Add GL_EXT_texture_format_BGRA8888 support
This commit is contained in:
@@ -69,6 +69,7 @@ static const char *es2_extensions[] = {
|
|||||||
"GL_ARB_depth_texture",
|
"GL_ARB_depth_texture",
|
||||||
"GL_EXT_packed_depth_stencil",
|
"GL_EXT_packed_depth_stencil",
|
||||||
"GL_EXT_framebuffer_object",
|
"GL_EXT_framebuffer_object",
|
||||||
|
"GL_EXT_texture_format_BGRA8888",
|
||||||
|
|
||||||
#if FEATURE_OES_EGL_image
|
#if FEATURE_OES_EGL_image
|
||||||
"GL_OES_EGL_image",
|
"GL_OES_EGL_image",
|
||||||
|
@@ -383,6 +383,7 @@
|
|||||||
<value name="GL_ALPHA"/>
|
<value name="GL_ALPHA"/>
|
||||||
<value name="GL_RGB"/>
|
<value name="GL_RGB"/>
|
||||||
<value name="GL_RGBA"/>
|
<value name="GL_RGBA"/>
|
||||||
|
<value name="GL_BGRA_EXT"/>
|
||||||
<value name="GL_LUMINANCE"/>
|
<value name="GL_LUMINANCE"/>
|
||||||
<value name="GL_LUMINANCE_ALPHA"/>
|
<value name="GL_LUMINANCE_ALPHA"/>
|
||||||
<value name="GL_DEPTH_COMPONENT" category="OES_depth_texture"/>
|
<value name="GL_DEPTH_COMPONENT" category="OES_depth_texture"/>
|
||||||
@@ -458,11 +459,18 @@
|
|||||||
|
|
||||||
<desc name="format" category="OES_packed_depth_stencil">
|
<desc name="format" category="OES_packed_depth_stencil">
|
||||||
<value name="GL_DEPTH_STENCIL_OES"/>
|
<value name="GL_DEPTH_STENCIL_OES"/>
|
||||||
|
|
||||||
<desc name="type" error="GL_INVALID_OPERATION">
|
<desc name="type" error="GL_INVALID_OPERATION">
|
||||||
<value name="GL_UNSIGNED_INT_24_8_OES"/>
|
<value name="GL_UNSIGNED_INT_24_8_OES"/>
|
||||||
</desc>
|
</desc>
|
||||||
</desc>
|
</desc>
|
||||||
|
|
||||||
|
<desc name="format" category="EXT_texture_format_BGRA8888">
|
||||||
|
<value name="GL_BGRA_EXT"/>
|
||||||
|
|
||||||
|
<desc name="type" error="GL_INVALID_OPERATION">
|
||||||
|
<value name="GL_UNSIGNED_BYTE"/>
|
||||||
|
</desc>
|
||||||
|
</desc>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template name="TexEnv">
|
<template name="TexEnv">
|
||||||
@@ -4121,6 +4129,7 @@
|
|||||||
<category name="OES_depth_texture"/>
|
<category name="OES_depth_texture"/>
|
||||||
<category name="OES_packed_depth_stencil"/>
|
<category name="OES_packed_depth_stencil"/>
|
||||||
<category name="OES_standard_derivatives"/>
|
<category name="OES_standard_derivatives"/>
|
||||||
|
<category name="EXT_texture_format_BGRA8888"/>
|
||||||
|
|
||||||
<category name="EXT_texture_compression_dxt1"/>
|
<category name="EXT_texture_compression_dxt1"/>
|
||||||
<category name="EXT_blend_minmax"/>
|
<category name="EXT_blend_minmax"/>
|
||||||
|
@@ -211,6 +211,7 @@ static const struct {
|
|||||||
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
|
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
|
||||||
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
|
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
|
||||||
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
|
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
|
||||||
|
{ OFF, "GL_EXT_texture_format_BGRA8888", F(EXT_texture_format_BGRA8888) },
|
||||||
#if FEATURE_OES_EGL_image
|
#if FEATURE_OES_EGL_image
|
||||||
{ OFF, "GL_OES_EGL_image", F(OES_EGL_image) },
|
{ OFF, "GL_OES_EGL_image", F(OES_EGL_image) },
|
||||||
#endif
|
#endif
|
||||||
@@ -894,6 +895,9 @@ make_extension_string_es2(const GLcontext *ctx, GLubyte *str)
|
|||||||
len += append_extension(&str, "GL_OES_EGL_image");
|
len += append_extension(&str, "GL_OES_EGL_image");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (ctx->Extensions.EXT_texture_format_BGRA8888)
|
||||||
|
len += append_extension(&str, "GL_EXT_texture_format_BGRA8888");
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2710,6 +2710,7 @@ struct gl_extensions
|
|||||||
GLboolean S3_s3tc;
|
GLboolean S3_s3tc;
|
||||||
GLboolean OES_EGL_image;
|
GLboolean OES_EGL_image;
|
||||||
GLboolean OES_draw_texture;
|
GLboolean OES_draw_texture;
|
||||||
|
GLboolean EXT_texture_format_BGRA8888;
|
||||||
/** The extension string */
|
/** The extension string */
|
||||||
const GLubyte *String;
|
const GLubyte *String;
|
||||||
/** Number of supported extensions */
|
/** Number of supported extensions */
|
||||||
|
Reference in New Issue
Block a user