diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/evas/src/lib/canvas/evas_gl.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/evas/src/lib/canvas/evas_gl.c')
-rw-r--r-- | libraries/evas/src/lib/canvas/evas_gl.c | 27 |
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 | ||
70 | EAPI Evas_GL_Config * | ||
71 | evas_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 | |||
82 | EAPI void | ||
83 | evas_gl_config_free(Evas_GL_Config *cfg) | ||
84 | { | ||
85 | if (cfg) free(cfg); | ||
86 | } | ||
87 | |||
63 | EAPI Evas_GL_Surface * | 88 | EAPI Evas_GL_Surface * |
64 | evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height) | 89 | evas_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) |