fi
if test "x${have_dep}" = "xyes" ; then
- if test "x$2" = "xyes" ; then
- 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 -lXext -lXrender"
- fi
- evas_engine_[]$1[]_cflags="-I/usr/include ${x_cflags}"
- evas_engine_[]$1[]_libs="${x_libs} -lGL $gl_pt_lib"
- evas_engine_gl_common_libs="-lGL $gl_pt_lib"
+ PKG_CHECK_MODULES([GL_EET], [eet >= 1.4.0], [have_dep="yes"], [have_dep="no"])
+ if test "x${have_dep}" = "xyes" ; then
+ if test "x$2" = "xyes" ; then
+ 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 -lXext -lXrender"
+ fi
+ evas_engine_[]$1[]_cflags="-I/usr/include ${x_cflags}"
+ evas_engine_[]$1[]_libs="${x_libs} -lGL $gl_pt_lib"
+ evas_engine_gl_common_libs="-lGL $gl_pt_lib"
+ fi
else
if test "x$2" = "xyes" ; then
x_libs="${x_libs} -lX11 -lXext -lXrender"
if test "x${have_egl}" = "xyes" ; then
AC_CHECK_LIB(GLESv2, glTexImage2D, [have_glesv2="yes"], , -lEGL ${x_libs} -lm $gl_pt_lib)
if test "x${have_glesv2}" = "xyes" ; then
- evas_engine_[]$1[]_cflags="${x_cflags}"
- evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
- evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
- have_dep="yes"
- gl_flavor_gles="no"
- AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
- gles_variety_sgx="yes"
+ PKG_CHECK_MODULES([GL_EET], [eet >= 1.4.0], [have_dep="yes"], [have_dep="no"])
+ if test "x${have_dep}" = "xyes" ; then
+ evas_engine_[]$1[]_cflags="${x_cflags}"
+ evas_engine_[]$1[]_libs="${x_libs} -lGLESv2 -lEGL -lm $gl_pt_lib"
+ evas_engine_gl_common_libs="-lGLESv2 -lm $gl_pt_lib"
+ have_dep="yes"
+ gl_flavor_gles="no"
+ AC_DEFINE(GLES_VARIETY_SGX, 1, [Imagination SGX GLES2 support])
+ gles_variety_sgx="yes"
+ fi
fi
fi
fi
Render_Engine *re;
Render_Engine_GL_Surface *sfc;
Evas_GL_Config *cfg;
+ int ret;
sfc = calloc(1, sizeof(Render_Engine_GL_Surface));
return NULL;
}
+ // Create Render Target Texture/Buffers if not initialized
+ if (!sfc->initialized)
+ {
+ // I'm using evas's original context to create the render target texture
+ // This is to prevent awkwardness in using native_surface_get() function
+ // If the rt texture creation is deferred till the context is created and
+ // make_current called, the user can't call native_surface_get() right
+ // after the surface is created. hence this is done here using evas' context.
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+ ret = eglMakeCurrent(re->win->egl_disp, re->win->egl_surface[0], re->win->egl_surface[0], re->win->egl_context[0]);
+#else
+ ret = glXMakeCurrent(re->info->info.display, re->win->win, re->win->context);
+#endif
+ if (!ret)
+ {
+ ERR("xxxMakeCurrent() failed!");
+ free(sfc);
+ return NULL;
+ }
+
+ // Create Render texture
+ if (!_create_rt_buffers(re, sfc))
+ {
+ ERR("_create_rt_buffers() failed.");
+ free(sfc);
+ return NULL;
+ }
+
+#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
+ ret = eglMakeCurrent(re->win->egl_disp, EGL_NO_SURFACE,
+ EGL_NO_SURFACE, EGL_NO_CONTEXT);
+#else
+ ret = glXMakeCurrent(re->info->info.display, None, NULL);
+#endif
+ if (!ret)
+ {
+ ERR("xxxMakeCurrent() failed!");
+ free(sfc);
+ return 0;
+ }
+ sfc->initialized = 1;
+ }
+
return sfc;
}
return 0;
}
- // Create Render Target Texture/Buffers if not initialized
- if (!sfc->initialized)
- {
- if (!_create_rt_buffers(re, sfc))
- {
- ERR("_create_rt_buffers() failed.");
- return 0;
- }
- sfc->initialized = 1;
- }
-
// Create FBO if not initalized already
if (!ctx->initialized)
{