summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-10-12 10:27:17 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-10-12 10:27:17 +0000
commit4d5b4b2f2433f6b0af141c92705a66330359e8fc (patch)
treef5ccb9bb6f6d1629cc7296733594061f8d61f421
parent6412cc135809331985c444f19205f51f65554b74 (diff)
fix gl pipeline problem with textures and map and the wrong program id
being set/restored. SVN revision: 64014
-rw-r--r--legacy/evas/src/modules/engines/gl_common/evas_gl_context.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c
index 36eeab2b5a..7ee41eef6d 100644
--- a/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c
+++ b/legacy/evas/src/modules/engines/gl_common/evas_gl_context.c
@@ -454,7 +454,7 @@ _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
454 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 454 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
455 } 455 }
456 456
457 glUseProgram(gc->pipe[0].shader.cur_prog); 457 glUseProgram(gc->state.current.cur_prog);
458 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 458 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
459} 459}
460 460
@@ -703,7 +703,7 @@ evas_gl_common_context_new(void)
703 SHADER_TEXTURE_ADD(shared, IMG_MASK, tex); 703 SHADER_TEXTURE_ADD(shared, IMG_MASK, tex);
704 SHADER_TEXTURE_ADD(shared, IMG_MASK, texm); 704 SHADER_TEXTURE_ADD(shared, IMG_MASK, texm);
705 705
706 glUseProgram(gc->pipe[0].shader.cur_prog); 706 glUseProgram(gc->state.current.cur_prog);
707 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 707 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
708 708
709 evas_gl_common_shader_program_init_done(); 709 evas_gl_common_shader_program_init_done();
@@ -891,7 +891,7 @@ evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc)
891 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 891 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
892 glEnableVertexAttribArray(SHAD_COLOR); 892 glEnableVertexAttribArray(SHAD_COLOR);
893 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 893 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
894 glUseProgram(gc->pipe[0].shader.cur_prog); 894 glUseProgram(gc->state.current.cur_prog);
895 GLERR(__FUNCTION__, __FILE__, __LINE__, ""); 895 GLERR(__FUNCTION__, __FILE__, __LINE__, "");
896 896
897 glActiveTexture(GL_TEXTURE0); 897 glActiveTexture(GL_TEXTURE0);
@@ -2184,7 +2184,6 @@ evas_gl_common_context_image_map_push(Evas_Engine_GL_Context *gc,
2184 blend, 2184 blend,
2185 smooth, 2185 smooth,
2186 clip, cx, cy, cw, ch); 2186 clip, cx, cy, cw, ch);
2187
2188 gc->pipe[pn].region.type = RTYPE_MAP; 2187 gc->pipe[pn].region.type = RTYPE_MAP;
2189 gc->pipe[pn].shader.cur_tex = tex->pt->texture; 2188 gc->pipe[pn].shader.cur_tex = tex->pt->texture;
2190 if (utexture) 2189 if (utexture)
@@ -2648,14 +2647,14 @@ shader_array_flush(Evas_Engine_GL_Context *gc)
2648 2647
2649 gc->state.current.cur_prog = gc->pipe[i].shader.cur_prog; 2648 gc->state.current.cur_prog = gc->pipe[i].shader.cur_prog;
2650 gc->state.current.cur_tex = gc->pipe[i].shader.cur_tex; 2649 gc->state.current.cur_tex = gc->pipe[i].shader.cur_tex;
2651 gc->state.current.blend = gc->pipe[i].shader.blend;
2652 gc->state.current.smooth = gc->pipe[i].shader.smooth;
2653 gc->state.current.render_op = gc->pipe[i].shader.render_op; 2650 gc->state.current.render_op = gc->pipe[i].shader.render_op;
2654 gc->state.current.clip = gc->pipe[i].shader.clip;
2655 gc->state.current.cx = gc->pipe[i].shader.cx; 2651 gc->state.current.cx = gc->pipe[i].shader.cx;
2656 gc->state.current.cy = gc->pipe[i].shader.cy; 2652 gc->state.current.cy = gc->pipe[i].shader.cy;
2657 gc->state.current.cw = gc->pipe[i].shader.cw; 2653 gc->state.current.cw = gc->pipe[i].shader.cw;
2658 gc->state.current.ch = gc->pipe[i].shader.ch; 2654 gc->state.current.ch = gc->pipe[i].shader.ch;
2655 gc->state.current.smooth = gc->pipe[i].shader.smooth;
2656 gc->state.current.blend = gc->pipe[i].shader.blend;
2657 gc->state.current.clip = gc->pipe[i].shader.clip;
2659 2658
2660 if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex); 2659 if (gc->pipe[i].array.vertex) free(gc->pipe[i].array.vertex);
2661 if (gc->pipe[i].array.color) free(gc->pipe[i].array.color); 2660 if (gc->pipe[i].array.color) free(gc->pipe[i].array.color);