diff options
author | Benjamin Otte <otte@gnome.org> | 2010-05-20 12:13:43 +0200 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2010-05-20 12:13:43 +0200 |
commit | 4889090c76bdab5e4eb887593caf5d5a34f90864 (patch) | |
tree | dc5a0d09aada3d1bd58b272afb40d1d726695255 | |
parent | 3cff2da912150868390bf4b9df166c88b3dfcf2e (diff) |
gl: set the active texture before fiddling with with glTexEnv
fixes the fixed function pipeline
-rw-r--r-- | src/cairo-gl-composite.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c index 13c4fb78..3ecc6b6e 100644 --- a/src/cairo-gl-composite.c +++ b/src/cairo-gl-composite.c @@ -697,6 +697,8 @@ _cairo_gl_set_src_operand (cairo_gl_context_t *ctx, if (ctx->current_shader) return; + glActiveTexture (GL_TEXTURE0); + switch (setup->src.type) { case CAIRO_GL_OPERAND_CONSTANT: _cairo_gl_set_tex_combine_constant_color (ctx, setup, 0, @@ -748,6 +750,8 @@ _cairo_gl_set_src_alpha_operand (cairo_gl_context_t *ctx, if (ctx->current_shader) return; + glActiveTexture (GL_TEXTURE0); + switch (setup->src.type) { case CAIRO_GL_OPERAND_CONSTANT: constant_color[0] = setup->src.constant.color[3]; @@ -791,6 +795,8 @@ _cairo_gl_set_component_alpha_mask_operand (cairo_gl_context_t *ctx, if (ctx->current_shader) return; + glActiveTexture (GL_TEXTURE1); + glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE); glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE); glTexEnvi (GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE); @@ -846,6 +852,8 @@ _cairo_gl_set_mask_operand (cairo_gl_context_t *ctx, if (ctx->current_shader) return; + glActiveTexture (GL_TEXTURE1); + switch (setup->mask.type) { case CAIRO_GL_OPERAND_CONSTANT: _cairo_gl_set_tex_combine_constant_color (ctx, setup, 1, |