#include "xmlpool.h"
#include "dri_screen.h"
-#include "dri_context.h"
#include "util/u_inlines.h"
#include "pipe/p_screen.h"
*/
void
dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
- const __GLcontextModes *mode)
+ const struct gl_config *mode)
{
memset(stvis, 0, sizeof(*stvis));
static boolean
dri_get_egl_image(struct st_manager *smapi,
- struct st_context_iface *stctxi,
void *egl_image,
struct st_egl_image *stimg)
{
- struct dri_context *ctx =
- (struct dri_context *)stctxi->st_manager_private;
+ struct dri_screen *screen = (struct dri_screen *)smapi;
__DRIimage *img = NULL;
- if (ctx->lookup_egl_image) {
- img = ctx->lookup_egl_image(ctx, egl_image);
+ if (screen->lookup_egl_image) {
+ img = screen->lookup_egl_image(screen, egl_image);
}
if (!img)
void
dri_destroy_screen_helper(struct dri_screen * screen)
{
- gl_api api;
- for (api = API_OPENGL; api <= API_OPENGLES2; ++api)
- if (screen->st_api[api] && screen->st_api[api]->destroy)
- screen->st_api[api]->destroy(screen->st_api[api]);
+ if (screen->st_api && screen->st_api->destroy)
+ screen->st_api->destroy(screen->st_api);
if (screen->base.screen)
screen->base.screen->destroy(screen->base.screen);
screen->base.get_egl_image = dri_get_egl_image;
screen->base.get_param = dri_get_param;
- screen->st_api[API_OPENGL] = st_gl_api_create();
- screen->st_api[API_OPENGLES1] = st_gl_api_create_es1();
- screen->st_api[API_OPENGLES2] = st_gl_api_create_es2();
-
- if (!screen->st_api[API_OPENGL] &&
- !screen->st_api[API_OPENGLES1] &&
- !screen->st_api[API_OPENGLES2])
+ screen->st_api = st_gl_api_create();
+ if (!screen->st_api)
return NULL;
if(pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES))