void __applegl_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { struct glx_context *gc = __glXGetCurrentContext(); Display *dpy = glXGetCurrentDisplay(); if (gc && gc->driContext) apple_glx_context_update(dpy, gc->driContext); __ogl_framework_api->Viewport(x, y, width, height); }
bool apple_glx_is_current_drawable(Display * dpy, void *ptr, GLXDrawable drawable) { struct apple_glx_context *ac = ptr; if (ac->drawable && ac->drawable->drawable == drawable) { return true; } else if (NULL == ac->drawable && None != ac->last_surface_window) { apple_glx_context_update(dpy, ac); return (ac->drawable && ac->drawable->drawable == drawable); } return false; }