summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_renderer_gl_base.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-11-12 15:52:21 -0800
committerJean-Philippe Andre <jp.andre@samsung.com>2016-01-05 15:43:44 +0900
commit116fe3c65cd541b85623820605e237c4076024f2 (patch)
tree3eb399112740116ea2b3d1dbe75d42a3532d3dae /src/lib/ector/gl/ector_renderer_gl_base.c
parent1adc3cd915f9bd55337e37fb782bd1c38080478c (diff)
ector: initial implementation of our own Ector GL backend.
Diffstat (limited to 'src/lib/ector/gl/ector_renderer_gl_base.c')
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_base.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/lib/ector/gl/ector_renderer_gl_base.c b/src/lib/ector/gl/ector_renderer_gl_base.c
new file mode 100644
index 0000000000..a659d3dfb6
--- /dev/null
+++ b/src/lib/ector/gl/ector_renderer_gl_base.c
@@ -0,0 +1,56 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <Eina.h>
6#include <Ector.h>
7
8#include "gl/Ector_GL.h"
9#include "ector_private.h"
10#include "ector_gl_private.h"
11
12typedef struct _Ector_Renderer_GL_Base_Data Ector_Renderer_GL_Base_Data;
13struct _Ector_Renderer_GL_Base_Data
14{
15 Ector_Renderer_Generic_Base_Data *base;
16};
17
18static Eina_Bool
19_ector_renderer_gl_base_ector_renderer_generic_base_prepare(Eo *obj EINA_UNUSED,
20 Ector_Renderer_GL_Base_Data *pd EINA_UNUSED)
21{
22 return EINA_TRUE;
23}
24
25static Eina_Bool
26_ector_renderer_gl_base_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
27 Ector_Renderer_GL_Base_Data *pd,
28 Efl_Gfx_Render_Op op,
29 Eina_Array *clips,
30 unsigned int mul_col EINA_UNUSED)
31{
32 Eina_Bool r;
33
34 eo_do(pd->base->surface,
35 r = ector_gl_surface_state_define(op, clips));
36
37 return r;
38}
39
40static Eo_Base *
41_ector_renderer_gl_base_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Base_Data *pd)
42{
43 eo_do_super(obj, ECTOR_RENDERER_GL_BASE_CLASS, obj = eo_constructor());
44 if (!obj) return NULL;
45
46 pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
47 return obj;
48}
49
50static void
51_ector_renderer_gl_base_eo_base_destructor(Eo *obj, Ector_Renderer_GL_Base_Data *pd)
52{
53 eo_data_xunref(obj, pd->base, obj);
54}
55
56#include "ector_renderer_gl_base.eo.c"