diff options
Diffstat (limited to 'tests/glean/tvertarraybgra.cpp')
-rw-r--r-- | tests/glean/tvertarraybgra.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/glean/tvertarraybgra.cpp b/tests/glean/tvertarraybgra.cpp index 737af0c44..f13b461ee 100644 --- a/tests/glean/tvertarraybgra.cpp +++ b/tests/glean/tvertarraybgra.cpp @@ -63,6 +63,11 @@ VertArrayBGRATest::reportError(const char *msg) bool VertArrayBGRATest::testAPI(void) { + // Get glSecondaryColorPointer() functon + PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointer = NULL; + SecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC) + GLUtils::getProcAddress("glSecondaryColorPointer"); + // Get glVertexAttrib() function PFNGLVERTEXATTRIBPOINTERARBPROC VertexAttribPointer = NULL; const char *version = (const char *) glGetString(GL_VERSION); @@ -84,10 +89,12 @@ VertArrayBGRATest::testAPI(void) return false; } - glSecondaryColorPointer(GL_BGRA, GL_UNSIGNED_BYTE, 0, array); - if (glGetError()) { - reportError("glSecondaryColorPointer(size=GL_BGRA) generated an error."); - return false; + if (SecondaryColorPointer) { + SecondaryColorPointer(GL_BGRA, GL_UNSIGNED_BYTE, 0, array); + if (glGetError()) { + reportError("glSecondaryColorPointer(size=GL_BGRA) generated an error."); + return false; + } } if (VertexAttribPointer) { |