summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2014-08-19 14:43:42 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-08-19 14:43:42 +1000
commit510a016c88fed4419b9c48324c9de9c161a5671b (patch)
tree8ac588778e3f0084f4fef6be42ae711de9a953f9
parentc6706adfcca60825c89e75c23e7e96a1154b0b88 (diff)
glvideomixer: get the attribute from the correct shader
-rw-r--r--ext/gl/gstglvideomixer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c
index 18b7b208e..b62cfd727 100644
--- a/ext/gl/gstglvideomixer.c
+++ b/ext/gl/gstglvideomixer.c
@@ -494,9 +494,6 @@ _draw_checker_background (GstGLVideoMixer * video_mixer)
};
/* *INDENT-ON* */
- attr_position_loc =
- gst_gl_shader_get_attribute_location (video_mixer->shader, "a_position");
-
if (!video_mixer->checker) {
if (!gst_gl_context_gen_shader (mixer->context, checker_v_src,
checker_f_src, &video_mixer->checker))
@@ -504,6 +501,8 @@ _draw_checker_background (GstGLVideoMixer * video_mixer)
}
gst_gl_shader_use (video_mixer->checker);
+ attr_position_loc =
+ gst_gl_shader_get_attribute_location (video_mixer->checker, "a_position");
gl->VertexAttribPointer (attr_position_loc, 3, GL_FLOAT,
GL_FALSE, 3 * sizeof (GLfloat), &v_vertices[0]);