[Mesa-dev] [PATCH 1/2] mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.
Gwenole Beauchesne
gb.devel at gmail.com
Fri Apr 20 08:59:21 PDT 2012
---
include/GLES2/gl2ext.h | 13 +++++++++++++
src/mapi/glapi/gen/es_EXT.xml | 8 ++++++++
src/mesa/main/APIspec.xml | 1 +
src/mesa/main/extensions.c | 1 +
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/GLES2/gl2ext.h b/include/GLES2/gl2ext.h
index 4eae246..25a9a34 100644
--- a/include/GLES2/gl2ext.h
+++ b/include/GLES2/gl2ext.h
@@ -292,6 +292,14 @@ typedef void* GLeglImageOES;
#define GL_BGRA_EXT 0x80E1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_RED_EXT 0x1903
+#define GL_RG_EXT 0x8227
+#define GL_R8_EXT 0x8229
+#define GL_RG8_EXT 0x822B
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
@@ -882,6 +890,11 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_texture_format_BGRA8888 1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_EXT_texture_rg 1
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_EXT_texture_type_2_10_10_10_REV 1
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index c7e7d07..6b0cf4a 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -627,4 +627,12 @@
<enum name="REQUIRED_TEXTURE_IMAGE_UNITS_OES" value="0x8D68"/>
</category>
+<!-- 103. GL_EXT_texture_rg -->
+<category name="GL_EXT_texture_rg" number="103">
+ <enum name="RED_EXT" value="0x1903"/>
+ <enum name="RG_EXT" value="0x8227"/>
+ <enum name="R8_EXT" value="0x8229"/>
+ <enum name="RG8_EXT" value="0x822B"/>
+</category>
+
</OpenGLAPI>
diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml
index f23857a..53f81d8 100644
--- a/src/mesa/main/APIspec.xml
+++ b/src/mesa/main/APIspec.xml
@@ -4140,6 +4140,7 @@
<category name="OES_packed_depth_stencil"/>
<category name="OES_standard_derivatives"/>
<category name="EXT_texture_format_BGRA8888"/>
+ <category name="EXT_texture_rg"/>
<category name="EXT_read_format_bgra"/>
<category name="EXT_texture_compression_dxt1"/>
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5f2c74a..57a5f5b 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -198,6 +198,7 @@ static const struct extension extension_table[] = {
{ "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 },
{ "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 },
{ "GL_EXT_texture_format_BGRA8888", o(dummy_true), ES1 | ES2, 2005 },
+ { "GL_EXT_texture_rg", o(ARB_texture_rg), ES2, 2011 },
{ "GL_EXT_read_format_bgra", o(dummy_true), ES1 | ES2, 2009 },
{ "GL_EXT_texture_integer", o(EXT_texture_integer), GL, 2006 },
{ "GL_EXT_texture_lod_bias", o(dummy_true), GL | ES1, 1999 },
--
1.7.5.4
More information about the mesa-dev
mailing list