From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/evas/src/lib/canvas/evas_gl.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'libraries/evas/src/lib/canvas/evas_gl.c') 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) evas_gl->magic = MAGIC_EVAS_GL; evas_gl->evas = e; + if (!evas_gl->evas->engine.func->gl_context_create) + { + ERR("GL engine not available\n"); + free(evas_gl); + return NULL; + } + return evas_gl; } @@ -60,6 +67,24 @@ evas_gl_free(Evas_GL *evas_gl) free(evas_gl); } +EAPI Evas_GL_Config * +evas_gl_config_new() +{ + Evas_GL_Config *cfg; + + cfg = calloc(1, sizeof(Evas_GL_Config)); + + if (!cfg) return NULL; + + return cfg; +} + +EAPI void +evas_gl_config_free(Evas_GL_Config *cfg) +{ + if (cfg) free(cfg); +} + EAPI Evas_GL_Surface * evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) { @@ -77,6 +102,8 @@ evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int surf = calloc(1, sizeof(Evas_GL_Surface)); + if (!surf) return NULL; + surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height); if (!surf->data) -- cgit v1.1