aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-27 13:25:30 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-27 13:25:30 +0100
commit78c878fffe96bf31a409544c339eb96a978e2e22 (patch)
treeb403b1250a6e2dd5a7346cc74147467df3a398d0
parentand here comes the lost file (diff)
downloadefl-devs/bu5hm4n/engine_explode.tar.gz
fixes for a black windowdevs/bu5hm4n/engine_explode
-rw-r--r--src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h15
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c6
2 files changed, 18 insertions, 3 deletions
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index a7effafde0..6882f8ca17 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -165,4 +165,19 @@ gl_generic_any_output_get(Render_Engine_GL_Generic *engine)
return NULL;
}
+static inline Render_Output_GL_Generic *
+gl_generic_output_find(Render_Engine_GL_Generic *engine)
+{
+ Render_Output_GL_Generic *output;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ {
+ return output;
+ }
+
+ return output;
+}
+
+
#endif
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 96b0e41a94..ce2eb9bebb 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2306,7 +2306,7 @@ eng_renderer_3d_get(void *output)
static void *
eng_drawable_new(void *engine, int w, int h, int alpha)
{
- eng_context_3d_use(engine);
+ eng_context_3d_use(gl_generic_output_find(engine));
#ifdef GL_GLES
return e3d_drawable_new(w, h, alpha, GL_DEPTH_STENCIL_OES, GL_NONE);
#else
@@ -2317,7 +2317,7 @@ eng_drawable_new(void *engine, int w, int h, int alpha)
static void
eng_drawable_free(void *engine, void *drawable)
{
- eng_context_3d_use(engine);
+ eng_context_3d_use(gl_generic_context_find(engine, EINA_FALSE));
e3d_drawable_free(drawable);
}
@@ -2453,7 +2453,7 @@ eng_texture_image_set(void *engine, void *texture, void *image)
{
Evas_Engine_GL_Context *gl_context;
- gl_context = gl_generic_context_get(engine, 1);
+ gl_context = gl_generic_context_find(engine, 1);
e3d_texture_set(gl_context, (E3D_Texture *)texture, (Evas_GL_Image *)image);
}