#ifndef GL_TEXTURE_EXTERNAL_OES
# define GL_TEXTURE_EXTERNAL_OES 0x8D65
#endif
-
-
#ifndef GL_UNPACK_ROW_LENGTH
# define GL_UNPACK_ROW_LENGTH 0x0CF2
#endif
-
+#ifndef EGL_NO_DISPLAY
+# define EGL_NO_DISPLAY 0
+#endif
#ifndef EGL_NO_CONTEXT
# define EGL_NO_CONTEXT 0
#endif
void
_egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
{
+#ifdef GL_GLES
EVGLNative_Display dpy = EGL_NO_DISPLAY;
EVGLNative_Context ctx = EGL_NO_CONTEXT;
EVGL_Resource *rsc = NULL;
+
int attribs[] = {
EVAS_GL_TEXTURE_LEVEL, 0,
EVAS_GL_IMAGE_PRESERVED, 0,
ctx = context->context;
*image = EXT_FUNC(eglCreateImage)(dpy, ctx, EVAS_GL_TEXTURE_2D, (EGLClientBuffer)tex, attribs);
+#else
+ (void) context; (void) image; (void) tex;
+#endif
}
// Gen Renderbuffer
if (ctx->extension_checked)
return 1;
+#ifdef GL_GLES
switch (ctx->version)
{
case EVAS_GL_GLES_1_X:
if (EXTENSION_SUPPORT(EGL_KHR_image_base)
&& EXTENSION_SUPPORT(EGL_KHR_gl_texture_2D_image))
egl_image_supported = 1;
+#endif
if (fbo_supported && egl_image_supported)
ctx->extension_supported = 1;
GL_UNSIGNED_BYTE, w, h);
if ((sfc->current_ctx) && (sfc->current_ctx->extension_supported))
_egl_image_attach_texture(sfc->current_ctx, &sfc->egl_image, sfc->color_buf);
+
sfc->buffer_mem[0] = w * h * 4;
}
evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
return 0;
}
+
if (!_context_ext_check(ctx))
{
ERR("Unable to check required extension for the current context");
void evgl_direct_info_set(int win_w, int win_h, int rot,
int img_x, int img_y, int img_w, int img_h,
int clip_x, int clip_y, int clip_w, int clip_h,
- void *hash_key);
+ void *surface);
void evgl_direct_info_clear(void);
void evgl_get_pixels_pre(void);
void evgl_get_pixels_post(void);