[227/906] explicitly bind the main texture and the curve one to separate units in rgb and luma to curve effects. This should solve the issue pointed in TODO item 21.

This commit is contained in:
Filippo Argiolas 2008-09-19 12:47:06 +02:00 committed by Matthew Waters
parent e8abbdaaa7
commit 43e92c4a3f
2 changed files with 19 additions and 3 deletions

View file

@ -62,7 +62,15 @@ static void gst_gl_effects_luma_to_curve (GstGLEffects *effects,
glDisable(GL_TEXTURE_1D);
}
glActiveTexture (GL_TEXTURE0);
glEnable (GL_TEXTURE_RECTANGLE_ARB);
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, texture);
gst_gl_shader_set_uniform_1i (shader, "tex", 0);
glDisable (GL_TEXTURE_RECTANGLE_ARB);
glActiveTexture (GL_TEXTURE5);
glEnable (GL_TEXTURE_1D);
glBindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);

View file

@ -59,10 +59,18 @@ static void gst_gl_effects_rgb_to_curve (GstGLEffects *effects,
curve.width, 0,
GL_RGB, GL_UNSIGNED_BYTE,
curve.pixel_data);
glDisable(GL_TEXTURE_1D);
}
glActiveTexture (GL_TEXTURE0);
glEnable (GL_TEXTURE_RECTANGLE_ARB);
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, texture);
gst_gl_shader_set_uniform_1i (shader, "tex", 0);
glDisable (GL_TEXTURE_RECTANGLE_ARB);
glActiveTexture (GL_TEXTURE5);
glEnable (GL_TEXTURE_1D);
glBindTexture (GL_TEXTURE_1D, effects->curve[curve_index]);