1. depth buf+ stencil buf explicityl zero for both glx and egl.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 25 Jan 2010 13:42:57 +0000 (13:42 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 25 Jan 2010 13:42:57 +0000 (13:42 +0000)
2. some debugging - havving issues. will revert debug stuff soon

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@45550 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/engines/gl_x11/evas_engine.c
src/modules/engines/gl_x11/evas_x_main.c

index fb39614..a1fd9b6 100644 (file)
@@ -127,6 +127,7 @@ eng_setup(Evas *e, void *in)
         re->info = info;
         re->evas = e;
        e->engine.data.output = re;
+        printf("eng_window_new: %i %i\n", e->output.w, e->output.h);
        re->win = eng_window_new(info->info.display,
                                 info->info.drawable,
                                 0 /* FIXME: screen 0 assumption */,
@@ -206,6 +207,7 @@ eng_setup(Evas *e, void *in)
      {
        re = e->engine.data.output;
        eng_window_free(re->win);
+        printf("resize eng_window_new: %i %i\n", e->output.w, e->output.h);
        re->win = eng_window_new(info->info.display,
                                 info->info.drawable,
                                 0,/* FIXME: screen 0 assumption */
@@ -397,6 +399,7 @@ eng_output_flush(void *data)
 
 #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
 //   glFlush();
+   printf("eglSwapBuffers(%p, %p)\n", re->win->egl_disp, re->win->egl_surface[0]);
    eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
 #else
 # ifdef VSYNC_TO_SCREEN
@@ -1582,6 +1585,7 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x,
    eng_window_use(re->win);
    evas_gl_common_context_target_surface_set(re->win->gl_context, surface);
    re->win->gl_context->dc = context;
+   printf("draw img %p: %i %i, %ix%i\n", image, dst_x, dst_y, dst_w, dst_h);
    evas_gl_common_image_draw(re->win->gl_context, image,
                              src_x, src_y, src_w, src_h,
                              dst_x, dst_y, dst_w, dst_h,
index 69fefff..a16c4b5 100644 (file)
@@ -49,35 +49,39 @@ eng_window_new(Display *disp,
 # if defined(GLES_VARIETY_S3C6410)
    if (_evas_gl_x11_vi->depth == 16) // 16bpp
      {
-        config_attrs[0] = EGL_SURFACE_TYPE;
-        config_attrs[1] = EGL_WINDOW_BIT;
-        config_attrs[2] = EGL_RENDERABLE_TYPE;
-        config_attrs[3] = EGL_OPENGL_ES2_BIT;
-        config_attrs[4] = EGL_RED_SIZE;
-        config_attrs[5] = 5;
-        config_attrs[6] = EGL_GREEN_SIZE;
-        config_attrs[7] = 6;
-        config_attrs[8] = EGL_BLUE_SIZE;
-        config_attrs[9] = 5;
+        config_attrs[0]  = EGL_SURFACE_TYPE;
+        config_attrs[1]  = EGL_WINDOW_BIT;
+        config_attrs[2]  = EGL_RENDERABLE_TYPE;
+        config_attrs[3]  = EGL_OPENGL_ES2_BIT;
+        config_attrs[4]  = EGL_RED_SIZE;
+        config_attrs[5]  = 5;
+        config_attrs[6]  = EGL_GREEN_SIZE;
+        config_attrs[7]  = 6;
+        config_attrs[8]  = EGL_BLUE_SIZE;
+        config_attrs[9]  = 5;
         config_attrs[10] = EGL_DEPTH_SIZE;
-        config_attrs[11] = 16;
-        config_attrs[12] = EGL_NONE;
+        config_attrs[11] = 0;
+        config_attrs[12] = EGL_STENCIL_SIZE;
+        config_attrs[13] = 0;
+        config_attrs[14] = EGL_NONE;
      }
    else // 24/32bit. no one does 8bpp anymore. and 15bpp... dead
      {
-        config_attrs[0] = EGL_SURFACE_TYPE;
-        config_attrs[1] = EGL_WINDOW_BIT;
-        config_attrs[2] = EGL_RENDERABLE_TYPE;
-        config_attrs[3] = EGL_OPENGL_ES2_BIT;
-        config_attrs[4] = EGL_RED_SIZE;
-        config_attrs[5] = 8;
-        config_attrs[6] = EGL_GREEN_SIZE;
-        config_attrs[7] = 8;
-        config_attrs[8] = EGL_BLUE_SIZE;
-        config_attrs[9] = 8;
+        config_attrs[0]  = EGL_SURFACE_TYPE;
+        config_attrs[1]  = EGL_WINDOW_BIT;
+        config_attrs[2]  = EGL_RENDERABLE_TYPE;
+        config_attrs[3]  = EGL_OPENGL_ES2_BIT;
+        config_attrs[4]  = EGL_RED_SIZE;
+        config_attrs[5]  = 8;
+        config_attrs[6]  = EGL_GREEN_SIZE;
+        config_attrs[7]  = 8;
+        config_attrs[8]  = EGL_BLUE_SIZE;
+        config_attrs[9]  = 8;
         config_attrs[10] = EGL_DEPTH_SIZE;
-        config_attrs[11] = 24;
-        config_attrs[12] = EGL_NONE;
+        config_attrs[11] = 0;
+        config_attrs[12] = EGL_STENCIL_SIZE;
+        config_attrs[13] = 0;
+        config_attrs[14] = EGL_NONE;
      }
 # elif defined(GLES_VARIETY_SGX)
    context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
@@ -255,6 +259,7 @@ eng_best_visual_get(Display *disp, int screen)
              GLX_RGBA, GLX_DOUBLEBUFFER,
                GLX_LEVEL, 0,
                GLX_DEPTH_SIZE, 0,
+               GLX_STENCIL_SIZE, 0,
                GLX_RED_SIZE, 1,
                GLX_GREEN_SIZE,1,
                GLX_BLUE_SIZE, 1,