summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_renderer_gl.c
blob: b06792ac3edc8ba8bd52e024d0deea3c5dd891fb (plain) (blame)
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_Data Ector_Renderer_GL_Data;
struct _Ector_Renderer_GL_Data
{
   Ector_Renderer_Data *base;
};

static Eina_Bool
_ector_renderer_gl_ector_renderer_prepare(Eo *obj EINA_UNUSED,
                                                            Ector_Renderer_GL_Data *pd EINA_UNUSED)
{
   return EINA_TRUE;
}

static Eina_Bool
_ector_renderer_gl_ector_renderer_draw(Eo *obj EINA_UNUSED,
                                                         Ector_Renderer_GL_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 Efl_Object *
_ector_renderer_gl_efl_object_constructor(Eo *obj, Ector_Renderer_GL_Data *pd)
{
   obj = efl_constructor(efl_super(obj, ECTOR_RENDERER_GL_CLASS));
   if (!obj) return NULL;

   pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
   return obj;
}

static void
_ector_renderer_gl_efl_object_destructor(Eo *obj, Ector_Renderer_GL_Data *pd)
{
   efl_data_xunref(obj, pd->base, obj);
}

#include "ector_renderer_gl.eo.c"