]> git.tdb.fi Git - libs/gl.git/blobdiff - gl.msp.xml
Be much more strict about extension support
[libs/gl.git] / gl.msp.xml
diff --git a/gl.msp.xml b/gl.msp.xml
new file mode 100644 (file)
index 0000000..cea6395
--- /dev/null
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<registry>
+    <!-- This file defines several fake extensions to facilitate detection
+    of certain core functionalities for which there's no official backport
+    extension. -->
+
+    <extensions>
+        <extension name="GL_MSP_legacy_features" supported="gl">
+            <require>
+                <command name="glEnableClientState" />
+                <command name="glDisableClientState" />
+
+                <enum name="GL_QUADS" />
+                <enum name="GL_QUAD_STRIP" />
+                <enum name="GL_LUMINANCE8" />
+                <enum name="GL_LUMINANCE8_ALPHA8" />
+
+                <enum name="GL_AMBIENT" />
+                <enum name="GL_DIFFUSE" />
+                <enum name="GL_SPECULAR" />
+                <enum name="GL_EMISSION" />
+                <enum name="GL_SHININESS" />
+                <enum name="GL_LIGHTING" />
+                <enum name="GL_LIGHT_MODEL_AMBIENT" />
+                <enum name="GL_LIGHT0" />
+                <enum name="GL_MAX_LIGHTS" />
+                <enum name="GL_POSITION" />
+                <enum name="GL_SPOT_DIRECTION" />
+                <enum name="GL_SPOT_EXPONENT" />
+                <enum name="GL_SPOT_CUTOFF" />
+                <enum name="GL_CONSTANT_ATTENUATION" />
+                <enum name="GL_LINEAR_ATTENUATION" />
+                <enum name="GL_QUADRATIC_ATTENUATION" />
+                <command name="glLightModelfv" />
+                <command name="glLightf" />
+                <command name="glLightfv" />
+                <command name="glMaterialf" />
+                <command name="glMaterialfv" />
+
+                <enum name="GL_FOG" />
+                <enum name="GL_FOG_MODE" />
+                <enum name="GL_FOG_DENSITY" />
+                <enum name="GL_FOG_COLOR" />
+                <enum name="GL_EXP" />
+                <command name="glFogi" />
+                <command name="glFogf" />
+                <command name="glFogfv" />
+
+                <enum name="GL_MODELVIEW" />
+                <enum name="GL_PROJECTION" />
+                <command name="glMatrixMode" />
+                <command name="glLoadMatrixf" />
+
+                <!-- Can't reuse EXT_vertex_array for these, as the functions
+                defined there have different signatures. -->
+                <enum name="GL_VERTEX_ARRAY" />
+                <enum name="GL_NORMAL_ARRAY" />
+                <enum name="GL_COLOR_ARRAY" />
+                <enum name="GL_TEXTURE_COORD_ARRAY" />
+                <command name="glVertexPointer" />
+                <command name="glNormalPointer" />
+                <command name="glColorPointer" />
+                <command name="glTexCoordPointer" />
+
+                <command name="glClipPlane" />
+            </require>
+        </extension>
+
+        <!-- OpenGL ES does not have glDrawBuffer. -->
+        <extension name="GL_MSP_draw_buffer" supported="gl">
+            <require>
+                <command name="glDrawBuffer" />
+                <command name="glReadBuffer" />
+            </require>
+        </extension>
+
+        <!-- OpenGL ES does not have harwdare clipping. -->
+        <extension name="GL_MSP_clipping" supported="gl">
+            <require>
+                <enum name="GL_MAX_CLIP_PLANES" />
+                <enum name="GL_CLIP_PLANE0" />
+                <enum name="GL_CLIP_PLANE1" />
+                <enum name="GL_CLIP_PLANE2" />
+                <enum name="GL_CLIP_PLANE3" />
+                <enum name="GL_CLIP_PLANE4" />
+                <enum name="GL_CLIP_PLANE5" />
+            </require>
+        </extension>
+
+        <!-- Stereo rendering is not supported on OpenGL ES, but I'm not
+        certain enough of its uselessness to remove the constants outright. -->
+        <extension name="GL_MSP_stereo_rendering" supported="gl">
+            <require>
+                <enum name="GL_FRONT_LEFT" />
+                <enum name="GL_FRONT_RIGHT" />
+                <enum name="GL_BACK_LEFT" />
+                <enum name="GL_BACK_RIGHT" />
+                <enum name="GL_LEFT" />
+                <enum name="GL_RIGHT" />
+            </require>
+        </extension>
+
+        <!-- Sized internal formats were introduced in OpenGL ES 3.0, but are
+        not available as an extension. -->
+        <extension name="GL_MSP_sized_internal_formats" supported="gl|gles2">
+            <require>
+                <enum name="GL_RGB8" />
+                <enum name="GL_RGBA8" />
+            </require>
+        </extension>
+
+        <!-- 1D textures are not available in OpenGL ES, but could conceivably
+        be added at a later date. -->
+        <extension name="GL_MSP_texture1D" supported="gl">
+            <require>
+                <command name="glTexImage1D" />
+                <command name="glTexSubImage1D" />
+                <enum name="GL_TEXTURE_1D" />
+            </require>
+        </extension>
+
+        <!-- The core version of primitive restart has different semantics
+        from the NV extension but is not available as a backport extension. -->
+        <extension name="GL_MSP_primitive_restart" supported="gl">
+            <require>
+                <enum name="GL_PRIMITIVE_RESTART" />
+                <enum name="GL_PRIMITIVE_RESTART_INDEX" />
+                <command name="glPrimitiveRestartIndex" />
+            </require>
+        </extension>
+    </extensions>
+</registry>