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

Function main

util/glreadtest.cpp:647–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645
646
647int main(int argc, char **argv)
648{
649 fprintf(stderr, "\n%s v%s (Build %s)\n", BENCH_NAME, __VERSION, __BUILD);
650
651 memcpy(&glFormat, pf_glformat, sizeof(pf_glformat));
652
653 if(argc > 1) for(int i = 1; i < argc; i++)
654 {
655 if(!stricmp(argv[i], "-h") || !strcmp(argv[i], "-?")) usage(argv);
656 else if(!stricmp(argv[i], "-window")) useWindow = true;
657 else if(!stricmp(argv[i], "-pm")) usePixmap = true;
658 #ifdef GL_EXT_framebuffer_object
659 else if(!stricmp(argv[i], "-fbo")) useFBO = true;
660 else if(!stricmp(argv[i], "-rtt")) { useRTT = true; useFBO = true; }
661 #endif
662 else if(!stricmp(argv[i], "-pbo")) usePBO = true;
663 #ifdef USEIFR
664 else if(!stricmp(argv[i], "-ifr")) useIFR = true;
665 #endif
666 else if(!stricmp(argv[i], "-alpha")) useAlpha = true;
667 else if(!stricmp(argv[i], "-rgb"))
668 {
669 for(int format = 0; format < PIXELFORMATS; format++)
670 if(format != PF_RGB) glFormat[format] = GL_NONE;
671 }
672 else if(!stricmp(argv[i], "-rgba"))
673 {
674 for(int format = 0; format < PIXELFORMATS; format++)
675 if(format != PF_RGBX) glFormat[format] = GL_NONE;
676 }
677 else if(!stricmp(argv[i], "-rgb10a2"))
678 {
679 for(int format = 0; format < PIXELFORMATS; format++)
680 if(format != PF_RGB10_X2) glFormat[format] = GL_NONE;
681 }
682 else if(!stricmp(argv[i], "-bgr"))
683 {
684 for(int format = 0; format < PIXELFORMATS; format++)
685 if(format != PF_BGR) glFormat[format] = GL_NONE;
686 }
687 else if(!stricmp(argv[i], "-bgra"))
688 {
689 for(int format = 0; format < PIXELFORMATS; format++)
690 if(format != PF_BGRX) glFormat[format] = GL_NONE;
691 }
692 else if(!stricmp(argv[i], "-bgr10a2"))
693 {
694 for(int format = 0; format < PIXELFORMATS; format++)
695 if(format != PF_BGR10_X2) glFormat[format] = GL_NONE;
696 }
697 #ifdef GL_ABGR_EXT
698 else if(!stricmp(argv[i], "-abgr"))
699 {
700 for(int format = 0; format < PIXELFORMATS; format++)
701 if(format != PF_XBGR) glFormat[format] = GL_NONE;
702 }
703 #endif
704 else if(!stricmp(argv[i], "-a2bgr10"))

Callers

nothing calls this directly

Calls 15

XOpenDisplayFunction · 0.85
findVisualFunction · 0.85
pf_getFunction · 0.85
XCreateWindowFunction · 0.85
drawableInitFunction · 0.85
glBindFramebufferEXTFunction · 0.85
glDeleteFramebuffersEXTFunction · 0.85
glXMakeCurrentFunction · 0.85
glXDestroyContextFunction · 0.85
glXDestroyPbufferFunction · 0.85
glXDestroyGLXPixmapFunction · 0.85
XDestroyWindowFunction · 0.85

Tested by

no test coverage detected