diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-03-18 13:27:57 -0400 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2019-03-20 12:36:52 -0700 |
commit | 4792bb8239e710b80b615d94d24a414581a66024 (patch) | |
tree | 0133169959dce360c4e5a5d21319b12be6eb58b8 | |
parent | b8ff87fc1d4945ca0a78f9eaffceba1c4a3cb1c0 (diff) | |
download | efl-4792bb8239e710b80b615d94d24a414581a66024.tar.gz |
elm_test: move gl api creation to glview init function
this needs to happen when the gl context is current to avoid a billion
errors and overall general failure
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8390
-rw-r--r-- | src/bin/elementary/test_glview.c | 2 | ||||
-rw-r--r-- | src/bin/elementary/test_glview_manygears.c | 2 | ||||
-rw-r--r-- | src/bin/elementary/test_glview_simple.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/elementary/test_glview.c b/src/bin/elementary/test_glview.c index edc116d62c..2ddb819561 100644 --- a/src/bin/elementary/test_glview.c +++ b/src/bin/elementary/test_glview.c @@ -428,6 +428,7 @@ _init_gl(Evas_Object *obj) { GLData *gld = evas_object_data_get(obj, "gld"); + gld->glapi = elm_glview_gl_api_get(obj); printf("GL_VERSION: %s\n", gld->glapi->glGetString(GL_VERSION)); fflush(stdout); @@ -684,7 +685,6 @@ _test_glview_do(Evas_GL_Context_Version version) // Animator and other vars ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "ani", ani); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _del, gl); diff --git a/src/bin/elementary/test_glview_manygears.c b/src/bin/elementary/test_glview_manygears.c index 97e9e88050..8ddac2adf2 100644 --- a/src/bin/elementary/test_glview_manygears.c +++ b/src/bin/elementary/test_glview_manygears.c @@ -673,6 +673,7 @@ _init_gl(Evas_Object *obj) { GLData *gld = evas_object_data_get(obj, "gld"); if (!gld) return; + gld->glapi = elm_glview_gl_api_get(obj); gears_init(gld); } @@ -892,7 +893,6 @@ test_glview_manygears(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void // Add animator for rendering ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "ani", ani); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _del, gl); diff --git a/src/bin/elementary/test_glview_simple.c b/src/bin/elementary/test_glview_simple.c index ae6eece316..d621a98d1d 100644 --- a/src/bin/elementary/test_glview_simple.c +++ b/src/bin/elementary/test_glview_simple.c @@ -121,6 +121,7 @@ static void _init_gl(Evas_Object *obj) { GL_Data *gld = evas_object_data_get(obj, "gld"); + gld->glapi = elm_glview_gl_api_get(obj); Evas_GL_API *gl = gld->glapi; GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f, -0.5f, -0.5f, 0.0f, @@ -259,7 +260,6 @@ test_glview_simple(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e elm_object_focus_set(gl, EINA_TRUE); ani = ecore_animator_add(_anim, gl); - gld->glapi = elm_glview_gl_api_get(gl); evas_object_data_set(gl, "gld", gld); evas_object_event_callback_add(gl, EVAS_CALLBACK_DEL, _gl_del_cb, ani); } |