summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-01-22 05:55:46 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-01-22 05:55:46 +0000
commitb2f09710684983a5381ce8d199fef6a49645e825 (patch)
treed16edca109201a25f9854f219aa614ef2ab95ad0 /legacy/evas/src/modules/engines/gl_x11/evas_engine.c
parentf5fe48fe5d7ceb3397f818569431faf53ee4b930 (diff)
fix variable
SVN revision: 45427
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 9e60304a04..0506f7a729 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -110,13 +110,14 @@ eng_setup(Evas *e, void *in)
110{ 110{
111 Render_Engine *re; 111 Render_Engine *re;
112 Evas_Engine_Info_GL_X11 *info; 112 Evas_Engine_Info_GL_X11 *info;
113 int eb, evb;
114 113
115 info = (Evas_Engine_Info_GL_X11 *)in; 114 info = (Evas_Engine_Info_GL_X11 *)in;
116 if (!e->engine.data.output) 115 if (!e->engine.data.output)
117 { 116 {
118#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 117#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
119#else 118#else
119 int eb, evb;
120
120 if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0; 121 if (!glXQueryExtension(info->info.display, &eb, &evb)) return 0;
121#endif 122#endif
122 re = calloc(1, sizeof(Render_Engine)); 123 re = calloc(1, sizeof(Render_Engine));
@@ -1015,7 +1016,6 @@ struct _Native
1015 1016
1016#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 1017#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
1017 EGLSurface egl_surface; 1018 EGLSurface egl_surface;
1018 EGLContext egl_context;
1019#else 1019#else
1020# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT 1020# ifdef GLX_BIND_TO_TEXTURE_TARGETS_EXT
1021 GLXFBConfig fbc; 1021 GLXFBConfig fbc;
@@ -1091,11 +1091,6 @@ _native_free_cb(void *data, void *image)
1091 Native *n = im->native.data; 1091 Native *n = im->native.data;
1092 1092
1093#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) 1093#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
1094 if (n->egl_context)
1095 {
1096 eglDestroyContext(re->win->egl_disp, n->egl_context);
1097 n->egl_context = 0;
1098 }
1099 if (n->egl_surface) 1094 if (n->egl_surface)
1100 { 1095 {
1101 eglDestroySurface(re->win->egl_disp, n->egl_surface); 1096 eglDestroySurface(re->win->egl_disp, n->egl_surface);
@@ -1159,14 +1154,9 @@ eng_image_native_set(void *data, void *image, void *native)
1159 if (n) 1154 if (n)
1160 { 1155 {
1161 EGLConfig egl_config; 1156 EGLConfig egl_config;
1162 int context_attrs[3];
1163 int config_attrs[20]; 1157 int config_attrs[20];
1164 int num_config, i; 1158 int num_config, i;
1165 1159
1166 context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
1167 context_attrs[1] = 2;
1168 context_attrs[2] = EGL_NONE;
1169
1170 i = 0; 1160 i = 0;
1171 config_attrs[i++] = EGL_RED_SIZE; 1161 config_attrs[i++] = EGL_RED_SIZE;
1172 config_attrs[i++] = 8; 1162 config_attrs[i++] = 8;
@@ -1187,11 +1177,8 @@ eng_image_native_set(void *data, void *image, void *native)
1187 eglChooseConfig(re->win->egl_disp, config_attrs, 1177 eglChooseConfig(re->win->egl_disp, config_attrs,
1188 &egl_config, 1, &num_config); 1178 &egl_config, 1, &num_config);
1189 n->egl_surface = eglCreatePixmapSurface(re->win->egl_disp, 1179 n->egl_surface = eglCreatePixmapSurface(re->win->egl_disp,
1190 egl_config, pixmap, 1180 egl_config, pm,
1191 NULL); 1181 NULL);
1192 eglBindAPI(EGL_OPENGL_ES_API);
1193 n->egl_context = eglCreateContext(re->win->egl_disp, egl_config,
1194 NULL, context_attrs);
1195 evas_gl_common_image_native_enable(im); 1182 evas_gl_common_image_native_enable(im);
1196 n->pixmap = pm; 1183 n->pixmap = pm;
1197 n->visual = vis; 1184 n->visual = vis;