It's not supported on OpenGL ES.
--- /dev/null
+extension MSP_clipping
<command name="glNormalPointer" />
<command name="glColorPointer" />
<command name="glTexCoordPointer" />
+
+ <command name="glClipPlane" />
</require>
</extension>
</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">
+#include <msp/gl/extensions/msp_clipping.h>
#include <msp/gl/extensions/msp_legacy_features.h>
#include "clipping.h"
#include "clipplane.h"
void Clipping::bind(bool legacy) const
{
+ static Require _req(MSP_clipping);
if(legacy)
- static Require _req(MSP_legacy_features);
+ static Require _req2(MSP_legacy_features);
if(legacy!=bound_with_legacy)
unbind();
+#include <msp/gl/extensions/msp_clipping.h>
#include <msp/gl/extensions/msp_legacy_features.h>
#include <msp/strings/format.h>
#include "clipplane.h"
void ClipPlane::bind_to(unsigned i) const
{
- Require _req(MSP_legacy_features);
+ Require _req(MSP_clipping);
+ Require _req2(MSP_legacy_features);
ClipUnit &unit = ClipUnit::get_unit(i);
if(unit.set_plane(this))
+#include <msp/gl/extensions/msp_clipping.h>
#include <stdexcept>
#include "clipunit.h"
#include "gl.h"
unsigned ClipUnit::get_n_units()
{
+ static Require _req(MSP_clipping);
static int count = get_i(GL_MAX_CLIP_PLANES);
return count;
}