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

Function getVisualFromConfig

server/eglxfakerut.cpp:116–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116XVisualInfo *getVisualFromConfig(Display *dpy, int screen, EGLDisplay edpy,
117 EGLConfig config)
118{
119 if(!dpy || !edpy || !config) return NULL;
120
121 EGLint redSize, greenSize, blueSize;
122 int depth = 24;
123
124 if(eglGetConfigAttrib(edpy, config, EGL_RED_SIZE, &redSize)
125 && eglGetConfigAttrib(edpy, config, EGL_GREEN_SIZE, &greenSize)
126 && eglGetConfigAttrib(edpy, config, EGL_BLUE_SIZE, &blueSize)
127 && redSize == 10 && greenSize == 10 && blueSize == 10)
128 depth = 30;
129
130 XVisualInfo vtemp; int nv = 0;
131
132 vtemp.depth = depth;
133 vtemp.c_class = TrueColor;
134 vtemp.screen = screen;
135
136 return XGetVisualInfo(dpy,
137 VisualDepthMask | VisualClassMask | VisualScreenMask, &vtemp, &nv);
138}
139
140
141unsigned int checkBufferColor(void)

Callers 4

readbackTestFunction · 0.70
visTestFunction · 0.70
multiThreadTestFunction · 0.70
offScreenTestFunction · 0.70

Calls 1

eglGetConfigAttribFunction · 0.85

Tested by

no test coverage detected