Bool glXMakeContextCurrent(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
| 1213 | |
| 1214 | // Bool glXMakeContextCurrent(Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) |
| 1215 | void 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) |
| 1236 | void gl_common_XCreatePixmap(CPU* cpu) { |
nothing calls this directly
no test coverage detected