return EGL_NO_CONTEXT;
}
+ if (ctx->Base.ClientAPI != EGL_OPENGL_API) {
+ _eglError(EGL_BAD_MATCH, "eglCreateContext(only OpenGL API supported)");
+ free(ctx);
+ return EGL_NO_CONTEXT;
+ }
+
/* create a softpipe context */
ctx->pipe = softpipe_create(xdrv->screen, xdrv->winsys, NULL);
_eglConfigToContextModesRec(conf, &visual);
ctx->Context = st_create_context(ctx->pipe, &visual, share_ctx);
+ _eglSaveContext(&ctx->Base);
return _eglGetContextHandle(&ctx->Base);
}
xdrv->Base.API.MakeCurrent = xlib_eglMakeCurrent;
xdrv->Base.API.SwapBuffers = xlib_eglSwapBuffers;
+ xdrv->Base.ClientAPIsMask = EGL_OPENGL_BIT /*| EGL_OPENGL_ES_BIT*/;
- xdrv->Base.ClientAPIs = "OpenGL"; /* "OpenGL_ES" */
xdrv->Base.Name = "Xlib/softpipe";
/* create one winsys and use it for all contexts/surfaces */
xdrv->screen = softpipe_create_screen(xdrv->winsys);
-
return &xdrv->Base;
}