MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / glGetString

Function glGetString

server/faker-gl.cpp:604–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602
603
604const GLubyte *glGetString(GLenum name)
605{
606 char *string = NULL;
607
608 if(faker::getOGLExcludeCurrent() || faker::getEGLXContextCurrent())
609 return _glGetString(name);
610
611 TRY();
612
613 string = (char *)_glGetString(name);
614 if(name == GL_EXTENSIONS && string
615 && strstr(string, "GL_EXT_x11_sync_object") != NULL)
616 {
617 if(!faker::glExtensions)
618 {
619 faker::GlobalCriticalSection::SafeLock l(globalMutex);
620 if(!faker::glExtensions)
621 {
622 faker::glExtensions = strdup(string);
623 if(!faker::glExtensions) THROW("strdup() failed");
624 char *ptr =
625 strstr((char *)faker::glExtensions, "GL_EXT_x11_sync_object");
626 if(ptr)
627 {
628 if(ptr[22] == ' ') memmove(ptr, &ptr[23], strlen(&ptr[23]) + 1);
629 else *ptr = 0;
630 }
631 }
632 }
633 string = faker::glExtensions;
634 }
635
636 CATCH();
637
638 return (GLubyte *)string;
639}
640
641
642const GLubyte *glGetStringi(GLenum name, GLuint index)

Callers 12

extensionQueryTestFunction · 0.85
extensionQueryTestFunction · 0.85
query_extensionFunction · 0.85
mainFunction · 0.85
print_screen_infoFunction · 0.85
draw_loopFunction · 0.85
draw_loopFunction · 0.85
mainFunction · 0.85
print_display_infoFunction · 0.85
readTestFunction · 0.85
displayFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 2

readTestFunction · 0.68
displayFunction · 0.68