Evas GL: Fix build errors for glx backend

Summary:
Fix build errors for glx backend made from previous commit
Revert parameter naming

Test Plan: Local Evas GL tests for 1.1, 2.0, and 3.0

Reviewers: jpeg

Subscribers: mythri, wonsik, cedric, mer.kim

Differential Revision: https://phab.enlightenment.org/D2117
This commit is contained in:
Dongyeon Kim 2015-03-09 20:41:58 +09:00 committed by Jean-Philippe Andre
parent d8fc60e0e6
commit 1a2c6ba1e1
3 changed files with 13 additions and 4 deletions

View File

@ -135,12 +135,12 @@
#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

View File

@ -236,9 +236,11 @@ _texture_attach_2d(GLuint tex, GLenum attach, GLenum attach2, int samples, Eina_
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,
@ -256,6 +258,9 @@ _egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
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
@ -783,6 +788,7 @@ _context_ext_check(EVGL_Context *ctx)
if (ctx->extension_checked)
return 1;
#ifdef GL_GLES
switch (ctx->version)
{
case EVAS_GL_GLES_1_X:
@ -798,6 +804,7 @@ _context_ext_check(EVGL_Context *ctx)
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;
@ -1094,6 +1101,7 @@ _surface_buffers_allocate(void *eng_data, EVGL_Surface *sfc, int w, int h, int m
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;
}
@ -2211,6 +2219,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
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");

View File

@ -46,7 +46,7 @@ void evgl_direct_override_get(Eina_Bool *override, Eina_Bool *force_off)
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);