evas_engine_gl_common_libs="-lGL -lpthread"
else
if test "x$2" = "xyes" ; then
- x_libs="${x_libs} -lX11 -lXext"
+ x_libs="${x_libs} -lX11 -lXext -lXrender"
else
x_dir=${x_dir:-/usr/X11R6}
x_cflags=${x_cflags:--I${x_includes:-$x_dir/include}}
- x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11"
+ x_libs="${x_libs:--L${x_libraries:-$x_dir/lib}} -lX11 -lXext -lXrender"
fi
- AC_CHECK_HEADERS([EGL/egl.h X11/X.h X11/Xlib.h], [have_egl="yes"])
+ AC_CHECK_HEADERS([EGL/egl.h X11/X.h X11/Xlib.h X11/extensions/Xrender.h], [have_egl="yes"])
if test "x${have_egl}" = "xyes" ; then
have_gles20="no"
AC_CHECK_LIB(gles20, glTexImage2D, [have_gles20="yes"], , -lEGL)
XMatchVisualInfo(disp, screen, depth, TrueColor, _evas_gl_x11_vi);
// GLX
#else
- int _evas_gl_x11_configuration[9] =
+
+#if 0 // use this if we want alpha
+ int config_attrs[20];
+ GLXFBConfig *configs = NULL, config = 0;
+ int i, num;
+
+ config_attrs[0] = GLX_DRAWABLE_TYPE;
+ config_attrs[1] = GLX_WINDOW_BIT;
+ config_attrs[2] = GLX_DOUBLEBUFFER;
+ config_attrs[3] = 1;
+ config_attrs[4] = GLX_RED_SIZE;
+ config_attrs[5] = 1;
+ config_attrs[6] = GLX_GREEN_SIZE;
+ config_attrs[7] = 1;
+ config_attrs[8] = GLX_BLUE_SIZE;
+ config_attrs[9] = 1;
+ config_attrs[10] = None;
+
+ // if rgba
+ config_attrs[10] = GLX_ALPHA_SIZE;
+ config_attrs[11] = 1;
+ config_attrs[12] = GLX_RENDER_TYPE;
+ config_attrs[13] = GLX_RGBA_BIT;
+ config_attrs[14] = None;
+
+ configs = glXChooseFBConfig(disp, 0, config_attrs, &num);
+ for (i = 0; i < num; i++)
+ {
+ XVisualInfo *visinfo;
+ XRenderPictFormat *format;
+
+ visinfo = glXGetVisualFromFBConfig(disp, configs[i]);
+ if (!visinfo) continue;
+ format = XRenderFindVisualFormat(disp, visinfo->visual);
+ if (!format) continue;
+
+ if (format->direct.alphaMask > 0)
+ {
+ config = configs[i];
+ _evas_gl_x11_vi = visinfo;
+ break;
+ }
+ XFree(visinfo);
+ }
+#else
+ int _evas_gl_x11_configuration[] =
{
GLX_DOUBLEBUFFER,
GLX_RGBA,
- GLX_RED_SIZE, 1,
- GLX_GREEN_SIZE, 1,
- GLX_BLUE_SIZE, 1,
+ GLX_RED_SIZE, 1,
+ GLX_GREEN_SIZE,1,
+ GLX_BLUE_SIZE, 1,
None
};
_evas_gl_x11_vi = glXChooseVisual(disp, screen,
_evas_gl_x11_configuration);
#endif
+
+#endif
}
if (!_evas_gl_x11_vi) return NULL;
return _evas_gl_x11_vi->visual;