aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib/canvas/evas_gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_gl.c')
-rw-r--r--libraries/evas/src/lib/canvas/evas_gl.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/canvas/evas_gl.c b/libraries/evas/src/lib/canvas/evas_gl.c
index 47bb583..85ed851 100644
--- a/libraries/evas/src/lib/canvas/evas_gl.c
+++ b/libraries/evas/src/lib/canvas/evas_gl.c
@@ -37,6 +37,13 @@ evas_gl_new(Evas *e)
37 evas_gl->magic = MAGIC_EVAS_GL; 37 evas_gl->magic = MAGIC_EVAS_GL;
38 evas_gl->evas = e; 38 evas_gl->evas = e;
39 39
40 if (!evas_gl->evas->engine.func->gl_context_create)
41 {
42 ERR("GL engine not available\n");
43 free(evas_gl);
44 return NULL;
45 }
46
40 return evas_gl; 47 return evas_gl;
41} 48}
42 49
@@ -60,6 +67,24 @@ evas_gl_free(Evas_GL *evas_gl)
60 free(evas_gl); 67 free(evas_gl);
61} 68}
62 69
70EAPI Evas_GL_Config *
71evas_gl_config_new()
72{
73 Evas_GL_Config *cfg;
74
75 cfg = calloc(1, sizeof(Evas_GL_Config));
76
77 if (!cfg) return NULL;
78
79 return cfg;
80}
81
82EAPI void
83evas_gl_config_free(Evas_GL_Config *cfg)
84{
85 if (cfg) free(cfg);
86}
87
63EAPI Evas_GL_Surface * 88EAPI Evas_GL_Surface *
64evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) 89evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height)
65{ 90{
@@ -77,6 +102,8 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int
77 102
78 surf = calloc(1, sizeof(Evas_GL_Surface)); 103 surf = calloc(1, sizeof(Evas_GL_Surface));
79 104
105 if (!surf) return NULL;
106
80 surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); 107 surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height);
81 108
82 if (!surf->data) 109 if (!surf->data)