summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_renderer_gl_base.c
blob: 75829cf576d96cec9dd6338132baff5d6fa26c1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <Eina.h>
#include <Ector.h>

#include "gl/Ector_GL.h"
#include "ector_private.h"
#include "ector_gl_private.h"

typedef struct _Ector_Renderer_GL_Base_Data Ector_Renderer_GL_Base_Data;
struct _Ector_Renderer_GL_Base_Data
{
   Ector_Renderer_Generic_Base_Data *base;
};

static Eina_Bool
_ector_renderer_gl_base_ector_renderer_generic_base_prepare(Eo *obj EINA_UNUSED,
                                                            Ector_Renderer_GL_Base_Data *pd EINA_UNUSED)
{
   return EINA_TRUE;
}

static Eina_Bool
_ector_renderer_gl_base_ector_renderer_generic_base_draw(Eo *obj EINA_UNUSED,
                                                         Ector_Renderer_GL_Base_Data *pd,
                                                         Efl_Gfx_Render_Op op,
                                                         Eina_Array *clips,
                                                         unsigned int mul_col EINA_UNUSED)
{
   Eina_Bool r;

   r = ector_gl_surface_state_define(pd->base->surface, op, clips);

   return r;
}

static Eo_Base *
_ector_renderer_gl_base_eo_base_constructor(Eo *obj, Ector_Renderer_GL_Base_Data *pd)
{
   obj = eo_constructor(eo_super(obj, ECTOR_RENDERER_GL_BASE_CLASS));
   if (!obj) return NULL;

   pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
   return obj;
}

static void
_ector_renderer_gl_base_eo_base_destructor(Eo *obj, Ector_Renderer_GL_Base_Data *pd)
{
   eo_data_xunref(obj, pd->base, obj);
}

#include "ector_renderer_gl_base.eo.c"