MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCL-CTS / gluCheckExtension

Function gluCheckExtension

test_conformance/gl/test_renderbuffer.cpp:26–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25#if defined(__linux__)
26GLboolean gluCheckExtension(const GLubyte *extension, const GLubyte *extensions)
27{
28 const GLubyte *start;
29 GLubyte *where, *terminator;
30
31 /* Extension names should not have spaces. */
32 where = (GLubyte *)strchr((const char *)extension, ' ');
33 if (where || *extension == '\0') return 0;
34 /* It takes a bit of care to be fool-proof about parsing the
35 OpenGL extensions string. Don't be fooled by sub-strings,
36 etc. */
37 start = extensions;
38 for (;;)
39 {
40 where = (GLubyte *)strstr((const char *)start, (const char *)extension);
41 if (!where) break;
42 terminator = where + strlen((const char *)extension);
43 if (where == start || *(where - 1) == ' ')
44 if (*terminator == ' ' || *terminator == '\0') return 1;
45 start = terminator;
46 }
47 return 0;
48}
49#endif
50
51

Callers 3

test_renderbuffer_readFunction · 0.70
test_renderbuffer_writeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected