return NULL;
}
-#ifdef GLX_VERSION_1_3
- if (GLX_dpy->fbconfigs)
+ if (GLX_dpy->have_fbconfig)
GLX_ctx->context =
glXCreateNewContext(GLX_dpy->dpy,
GLX_dpy->fbconfigs[GLX_egl_config_index(conf)],
GLX_ctx_shared ? GLX_ctx_shared->context : NULL,
GL_TRUE);
else
-#endif
GLX_ctx->context =
glXCreateContext(GLX_dpy->dpy,
&GLX_dpy->visuals[GLX_egl_config_index(conf)],
return NULL;
}
-#if 1
- /* (maybe?) need to have a direct rendering context */
- if (!glXIsDirect(GLX_dpy->dpy, GLX_ctx->context)) {
- glXDestroyContext(GLX_dpy->dpy, GLX_ctx->context);
- free(GLX_ctx);
- return NULL;
- }
-#endif
-
return &GLX_ctx->Base;
}
rdraw = (GLX_rsurf) ? GLX_rsurf->glx_drawable : None;
cctx = (GLX_ctx) ? GLX_ctx->context : NULL;
-#ifdef GLX_VERSION_1_3
- if (glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx))
- return EGL_TRUE;
-#endif
-
- if (ddraw == rdraw && glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx))
- return EGL_TRUE;
+ if (GLX_dpy->have_make_current_read)
+ return glXMakeContextCurrent(GLX_dpy->dpy, ddraw, rdraw, cctx);
+ else if (ddraw == rdraw)
+ return glXMakeCurrent(GLX_dpy->dpy, ddraw, cctx);
return EGL_FALSE;
}