diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-19 09:59:11 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-12-21 17:58:01 -0700 |
commit | 7871eaeae558d9fc2950bf16f69e9d4ce0b594e1 (patch) | |
tree | f5f4540c2dc72e3882dee3f538596203d62ef499 | |
parent | 5db48abedd1c2247dcb4e4d3f749b3197b265222 (diff) |
clipFlat: check/test GL_ARB_provoking_vertex
-rw-r--r-- | src/glean/tclipflat.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/glean/tclipflat.cpp b/src/glean/tclipflat.cpp index a2798c0..c9c03e9 100644 --- a/src/glean/tclipflat.cpp +++ b/src/glean/tclipflat.cpp @@ -36,7 +36,7 @@ // // XXX We should also test with two-sided lighting. // -// If GL_EXT_provoking_vertex is supported, that feature is tested as well. +// If GL_ARB/EXT_provoking_vertex is supported, that feature is tested as well. // // Author: Brian Paul @@ -48,8 +48,7 @@ namespace GLEAN { - -static PFNGLPROVOKINGVERTEXEXTPROC ProvokingVertexEXT_func = NULL; +static PFNGLPROVOKINGVERTEXEXTPROC ProvokingVertex_func = NULL; // Note: all correctly rendered tris/quad/polygons will be green. @@ -201,12 +200,18 @@ ClipFlatTest::setup(void) glCullFace(GL_FRONT); glEnable(GL_CULL_FACE); - provoking_vertex_first = GLUtils::haveExtension("GL_EXT_provoking_vertex"); - - if (provoking_vertex_first) { - ProvokingVertexEXT_func = reinterpret_cast<PFNGLPROVOKINGVERTEXEXTPROC> + if (GLUtils::haveExtension("GL_ARB_provoking_vertex")) { + ProvokingVertex_func = reinterpret_cast<PFNGLPROVOKINGVERTEXPROC> + (GLUtils::getProcAddress("glProvokingVertex")); + provoking_vertex_first = true; + } + else if (GLUtils::haveExtension("GL_EXT_provoking_vertex")) { + ProvokingVertex_func = reinterpret_cast<PFNGLPROVOKINGVERTEXEXTPROC> (GLUtils::getProcAddress("glProvokingVertexEXT")); + provoking_vertex_first = true; + } + if (provoking_vertex_first) { GLboolean k; glGetBooleanv(GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT, &k); quads_follows_pv_convention = k; @@ -434,7 +439,7 @@ ClipFlatTest::runOne(ClipFlatResult &r, Window &w) Elements(PolygonVerts)); if (provoking_vertex_first) { - ProvokingVertexEXT_func(GL_FIRST_VERTEX_CONVENTION_EXT); + ProvokingVertex_func(GL_FIRST_VERTEX_CONVENTION_EXT); testing_first_pv = true; if (r.pass) |