forked from enlightenment/efl
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:
parent
d8fc60e0e6
commit
1a2c6ba1e1
|
@ -135,12 +135,12 @@
|
||||||
#ifndef GL_TEXTURE_EXTERNAL_OES
|
#ifndef GL_TEXTURE_EXTERNAL_OES
|
||||||
# define GL_TEXTURE_EXTERNAL_OES 0x8D65
|
# define GL_TEXTURE_EXTERNAL_OES 0x8D65
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef GL_UNPACK_ROW_LENGTH
|
#ifndef GL_UNPACK_ROW_LENGTH
|
||||||
# define GL_UNPACK_ROW_LENGTH 0x0CF2
|
# define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef EGL_NO_DISPLAY
|
||||||
|
# define EGL_NO_DISPLAY 0
|
||||||
|
#endif
|
||||||
#ifndef EGL_NO_CONTEXT
|
#ifndef EGL_NO_CONTEXT
|
||||||
# define EGL_NO_CONTEXT 0
|
# define EGL_NO_CONTEXT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -236,9 +236,11 @@ _texture_attach_2d(GLuint tex, GLenum attach, GLenum attach2, int samples, Eina_
|
||||||
void
|
void
|
||||||
_egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
|
_egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
|
||||||
{
|
{
|
||||||
|
#ifdef GL_GLES
|
||||||
EVGLNative_Display dpy = EGL_NO_DISPLAY;
|
EVGLNative_Display dpy = EGL_NO_DISPLAY;
|
||||||
EVGLNative_Context ctx = EGL_NO_CONTEXT;
|
EVGLNative_Context ctx = EGL_NO_CONTEXT;
|
||||||
EVGL_Resource *rsc = NULL;
|
EVGL_Resource *rsc = NULL;
|
||||||
|
|
||||||
int attribs[] = {
|
int attribs[] = {
|
||||||
EVAS_GL_TEXTURE_LEVEL, 0,
|
EVAS_GL_TEXTURE_LEVEL, 0,
|
||||||
EVAS_GL_IMAGE_PRESERVED, 0,
|
EVAS_GL_IMAGE_PRESERVED, 0,
|
||||||
|
@ -256,6 +258,9 @@ _egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
|
||||||
ctx = context->context;
|
ctx = context->context;
|
||||||
|
|
||||||
*image = EXT_FUNC(eglCreateImage)(dpy, ctx, EVAS_GL_TEXTURE_2D, (EGLClientBuffer)tex, attribs);
|
*image = EXT_FUNC(eglCreateImage)(dpy, ctx, EVAS_GL_TEXTURE_2D, (EGLClientBuffer)tex, attribs);
|
||||||
|
#else
|
||||||
|
(void) context; (void) image; (void) tex;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gen Renderbuffer
|
// Gen Renderbuffer
|
||||||
|
@ -783,6 +788,7 @@ _context_ext_check(EVGL_Context *ctx)
|
||||||
if (ctx->extension_checked)
|
if (ctx->extension_checked)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
#ifdef GL_GLES
|
||||||
switch (ctx->version)
|
switch (ctx->version)
|
||||||
{
|
{
|
||||||
case EVAS_GL_GLES_1_X:
|
case EVAS_GL_GLES_1_X:
|
||||||
|
@ -798,6 +804,7 @@ _context_ext_check(EVGL_Context *ctx)
|
||||||
if (EXTENSION_SUPPORT(EGL_KHR_image_base)
|
if (EXTENSION_SUPPORT(EGL_KHR_image_base)
|
||||||
&& EXTENSION_SUPPORT(EGL_KHR_gl_texture_2D_image))
|
&& EXTENSION_SUPPORT(EGL_KHR_gl_texture_2D_image))
|
||||||
egl_image_supported = 1;
|
egl_image_supported = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (fbo_supported && egl_image_supported)
|
if (fbo_supported && egl_image_supported)
|
||||||
ctx->extension_supported = 1;
|
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);
|
GL_UNSIGNED_BYTE, w, h);
|
||||||
if ((sfc->current_ctx) && (sfc->current_ctx->extension_supported))
|
if ((sfc->current_ctx) && (sfc->current_ctx->extension_supported))
|
||||||
_egl_image_attach_texture(sfc->current_ctx, &sfc->egl_image, sfc->color_buf);
|
_egl_image_attach_texture(sfc->current_ctx, &sfc->egl_image, sfc->color_buf);
|
||||||
|
|
||||||
sfc->buffer_mem[0] = w * h * 4;
|
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);
|
evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_context_ext_check(ctx))
|
if (!_context_ext_check(ctx))
|
||||||
{
|
{
|
||||||
ERR("Unable to check required extension for the current context");
|
ERR("Unable to check required extension for the current context");
|
||||||
|
|
|
@ -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,
|
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 img_x, int img_y, int img_w, int img_h,
|
||||||
int clip_x, int clip_y, int clip_w, int clip_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_direct_info_clear(void);
|
||||||
void evgl_get_pixels_pre(void);
|
void evgl_get_pixels_pre(void);
|
||||||
void evgl_get_pixels_post(void);
|
void evgl_get_pixels_post(void);
|
||||||
|
|
Loading…
Reference in New Issue