MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / opengl_CheckExtension

Function opengl_CheckExtension

renderer/HardwareOpenGL.cpp:230–244  ·  view source on GitHub ↗

returns true if the passed in extension name is supported

Source from the content-addressed store, hash-verified

228
229// returns true if the passed in extension name is supported
230bool opengl_CheckExtension(const char *extName) {
231 const char *p = (const char *)dglGetString(GL_EXTENSIONS);
232 int extNameLen = strlen(extName);
233 const char *end = p + strlen(p);
234
235 while (p < end) {
236 int n = strcspn(p, " ");
237 if ((extNameLen == n) && (strncmp(extName, p, n) == 0))
238 return true;
239
240 p += (n + 1);
241 }
242
243 return false;
244}
245
246// Gets some specific information about this particular flavor of opengl
247void opengl_GetInformation() {

Callers 1

opengl_InitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected