summaryrefslogtreecommitdiff
path: root/legacy/evas/src
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2012-10-26 18:54:45 +0000
committerRafael Antognolli <antognolli@gmail.com>2012-10-26 18:54:45 +0000
commit60dfe259c8062c6462920cb42be7d7b304277728 (patch)
treec8695a70de51da485bdc13df4eb827d4c3ade5da /legacy/evas/src
parentdd7e8ad1a714567ef3acc609a1d17796644d85a4 (diff)
evas/wayland_egl: Change some ifdefs to make it compile withot GLES.
This will not make the engine work, but its build won't fail. SVN revision: 78554
Diffstat (limited to 'legacy/evas/src')
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_common.h4
-rw-r--r--legacy/evas/src/modules/engines/wayland_egl/evas_engine.c26
-rw-r--r--legacy/evas/src/modules/engines/wayland_egl/evas_engine.h9
3 files changed, 34 insertions, 5 deletions
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
index f8c6f1658d..67507b3a93 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_common.h
@@ -350,10 +350,8 @@ struct _Evas_Engine_GL_Context
350 /* If this is set: Force drawing with a particular filter */ 350 /* If this is set: Force drawing with a particular filter */
351 GLuint filter_prog; 351 GLuint filter_prog;
352 352
353#ifdef GL_GLES 353 // FIXME: hack. expose egl display to gl core for egl image sec extn.
354// FIXME: hack. expose egl display to gl core for egl image sec extn.
355 void *egldisp; 354 void *egldisp;
356#endif
357}; 355};
358 356
359struct _Evas_GL_Texture_Pool 357struct _Evas_GL_Texture_Pool
diff --git a/legacy/evas/src/modules/engines/wayland_egl/evas_engine.c b/legacy/evas/src/modules/engines/wayland_egl/evas_engine.c
index 6385b771a9..f0f82d1c67 100644
--- a/legacy/evas/src/modules/engines/wayland_egl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/wayland_egl/evas_engine.c
@@ -2232,8 +2232,13 @@ _attach_fbo_surface(Render_Engine *data __UNUSED__,
2232 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 2232 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
2233 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 2233 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
2234 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 2234 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
2235#ifdef GL_GLES
2235 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, sfc->w, sfc->h, 2236 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, sfc->w, sfc->h,
2236 0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, NULL); 2237 0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, NULL);
2238#else
2239 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL, sfc->w, sfc->h,
2240 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
2241#endif
2237 if (sfc->rt_msaa_samples) 2242 if (sfc->rt_msaa_samples)
2238 { 2243 {
2239 glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER, 2244 glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER,
@@ -2432,7 +2437,12 @@ _check_gl_surface_format(GLint int_fmt, GLenum fmt, GLenum attachment, GLenum at
2432 if (attachment) 2437 if (attachment)
2433 { 2438 {
2434 // This is a little hacky but this is how we'll have to do for now. 2439 // This is a little hacky but this is how we'll have to do for now.
2440 // PS: Now it's even more hacky.
2441#ifdef GL_GLES
2435 if (attach_fmt == GL_DEPTH_STENCIL_OES) 2442 if (attach_fmt == GL_DEPTH_STENCIL_OES)
2443#else
2444 if (attach_fmt == GL_DEPTH_STENCIL)
2445#endif
2436 { 2446 {
2437 glGenTextures(1, &ds_tex); 2447 glGenTextures(1, &ds_tex);
2438 glBindTexture(GL_TEXTURE_2D, ds_tex); 2448 glBindTexture(GL_TEXTURE_2D, ds_tex);
@@ -2440,8 +2450,13 @@ _check_gl_surface_format(GLint int_fmt, GLenum fmt, GLenum attachment, GLenum at
2440 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 2450 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
2441 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 2451 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
2442 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); 2452 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
2453#ifdef GL_GLES
2443 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, w, h, 2454 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL_OES, w, h,
2444 0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, NULL); 2455 0, GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES, NULL);
2456#else
2457 glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_STENCIL, w, h,
2458 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL);
2459#endif
2445 if (mult_samples) 2460 if (mult_samples)
2446 { 2461 {
2447 glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, 2462 glsym_glFramebufferTexture2DMultisample(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
@@ -2538,6 +2553,7 @@ _set_gl_surface_cap(Render_Engine *re)
2538 2553
2539 re->gl_cap.depth_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT, re->gl_cap.msaa_samples[i]); 2554 re->gl_cap.depth_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT, re->gl_cap.msaa_samples[i]);
2540 re->gl_cap.depth_16[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT16, re->gl_cap.msaa_samples[i]); 2555 re->gl_cap.depth_16[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT16, re->gl_cap.msaa_samples[i]);
2556#ifdef GL_GLES
2541 re->gl_cap.depth_24[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24_OES, re->gl_cap.msaa_samples[i]); 2557 re->gl_cap.depth_24[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24_OES, re->gl_cap.msaa_samples[i]);
2542 re->gl_cap.depth_32[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT32_OES, re->gl_cap.msaa_samples[i]); 2558 re->gl_cap.depth_32[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT32_OES, re->gl_cap.msaa_samples[i]);
2543 2559
@@ -2546,6 +2562,16 @@ _set_gl_surface_cap(Render_Engine *re)
2546 re->gl_cap.stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX8, re->gl_cap.msaa_samples[i]); 2562 re->gl_cap.stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX8, re->gl_cap.msaa_samples[i]);
2547 2563
2548 re->gl_cap.depth_24_stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_STENCIL_OES, GL_DEPTH_STENCIL_OES, re->gl_cap.msaa_samples[i]); 2564 re->gl_cap.depth_24_stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_STENCIL_OES, GL_DEPTH_STENCIL_OES, re->gl_cap.msaa_samples[i]);
2565#else
2566 re->gl_cap.depth_24[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24, re->gl_cap.msaa_samples[i]);
2567 re->gl_cap.depth_32[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT32, re->gl_cap.msaa_samples[i]);
2568
2569 re->gl_cap.stencil_1[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX1, re->gl_cap.msaa_samples[i]);
2570 re->gl_cap.stencil_4[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX4, re->gl_cap.msaa_samples[i]);
2571 re->gl_cap.stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_STENCIL_ATTACHMENT, GL_STENCIL_INDEX8, re->gl_cap.msaa_samples[i]);
2572
2573 re->gl_cap.depth_24_stencil_8[i] = _check_gl_surface_format(GL_RGBA, GL_RGBA, GL_DEPTH_STENCIL, GL_DEPTH_STENCIL, re->gl_cap.msaa_samples[i]);
2574#endif
2549 } 2575 }
2550 2576
2551// _print_gl_surface_cap(re, 0); 2577// _print_gl_surface_cap(re, 0);
diff --git a/legacy/evas/src/modules/engines/wayland_egl/evas_engine.h b/legacy/evas/src/modules/engines/wayland_egl/evas_engine.h
index 204d7932a0..7cb076b50f 100644
--- a/legacy/evas/src/modules/engines/wayland_egl/evas_engine.h
+++ b/legacy/evas/src/modules/engines/wayland_egl/evas_engine.h
@@ -11,8 +11,13 @@
11#define GL_GLEXT_PROTOTYPES 11#define GL_GLEXT_PROTOTYPES
12 12
13#include <EGL/egl.h> 13#include <EGL/egl.h>
14#include <GLES2/gl2.h> 14#ifdef GL_GLES
15#include <GLES2/gl2ext.h> 15# include <GLES2/gl2.h>
16# include <GLES2/gl2ext.h>
17#else
18# include <GL/gl.h>
19# include <GL/glext.h>
20#endif
16#include <wayland-egl.h> 21#include <wayland-egl.h>
17 22
18extern int _evas_engine_wl_egl_log_dom; 23extern int _evas_engine_wl_egl_log_dom;