MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / gl_common_XMakeContextCurrent

Function gl_common_XMakeContextCurrent

source/opengl/glcommon.cpp:1215–1233  ·  view source on GitHub ↗

Bool glXMakeContextCurrent(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)

Source from the content-addressed store, hash-verified

1213
1214// Bool glXMakeContextCurrent(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
1215void gl_common_XMakeContextCurrent(CPU* cpu) {
1216 U32 draw = ARG2;
1217 U32 read = ARG3;
1218 U32 ctx = ARG4;
1219 if (read && read != draw) {
1220 kpanic("glXMakeContextCurrent");
1221 }
1222
1223 KThread* thread = cpu->thread;
1224 XServer* server = XServer::getServer();
1225 XDrawablePtr d = server->getDrawable(draw);
1226
1227 if (ctx && !d) {
1228 EAX = False;
1229 return;
1230 }
1231 thread->currentContext = ctx;
1232 EAX = KNativeSystem::getOpenGL()->glMakeCurrent(thread, d, ctx) ? True : False;
1233}
1234
1235// GLXPixmap glXCreatePixmap(Display* dpy, GLXFBConfig config, Pixmap pixmap, const int* attrib_list)
1236void gl_common_XCreatePixmap(CPU* cpu) {

Callers

nothing calls this directly

Calls 3

kpanicFunction · 0.85
getDrawableMethod · 0.80
glMakeCurrentMethod · 0.45

Tested by

no test coverage detected