location = GPOINTER_TO_INT (value);
}
+ GST_TRACE_OBJECT (shader, "Retrieved uniform \'%s\' location %i", name,
+ location);
+
return location;
}
}
if (shader->context->gl_vtable->IsProgram)
- g_assert (shader->context->gl_vtable->IsProgram (shader->priv->
- program_handle));
+ g_assert (shader->context->gl_vtable->IsProgram (shader->
+ priv->program_handle));
if (shader->context->gl_vtable->IsShader)
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
}
if (shader->context->gl_vtable->IsProgram)
- g_assert (shader->context->gl_vtable->IsProgram (shader->priv->
- program_handle));
+ g_assert (shader->context->gl_vtable->IsProgram (shader->
+ priv->program_handle));
if (shader->context->gl_vtable->IsShader)
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
gl->UseProgramObject (0);
}
+#define set_uniform_pre_check(shader, name) \
+ GLint location = -1; \
+ g_return_if_fail (shader != NULL); \
+ g_return_if_fail (shader->priv->program_handle != 0); \
+ location = _get_uniform_location (shader, name);
+
+#if G_HAVE_ISO_VARARGS
+
+#define set_uniform_v(gl_suffix, c_type, debug_stride, debug_str, ...) \
+void \
+G_PASTE(gst_gl_shader_set_uniform_,gl_suffix) (GstGLShader * shader, \
+ const gchar * name, guint count, const c_type * value) \
+{ \
+ guint i; \
+ set_uniform_pre_check(shader, name) \
+ for (i = 0; i < count; i++) { \
+ const c_type * item = &value[i * debug_stride]; \
+ GST_TRACE_OBJECT (shader, "Setting uniform %s (%i) index %i to " \
+ debug_str, name, location, i, __VA_ARGS__); \
+ } \
+ shader->context->gl_vtable->G_PASTE(Uniform,gl_suffix) (location, count, value); \
+}
+
+#define set_uniform_func_decl(gl_suffix, ...) \
+void \
+G_PASTE(gst_gl_shader_set_uniform_,gl_suffix) (GstGLShader * shader, \
+ const gchar * name, __VA_ARGS__)
+
+#define set_uniform_body(gl_suffix, debug_str, ...) \
+{ \
+ set_uniform_pre_check(shader, name) \
+ GST_TRACE_OBJECT (shader, "Setting uniform %s (%i) = " debug_str, \
+ name, location, __VA_ARGS__); \
+ shader->context->gl_vtable->G_PASTE(Uniform,gl_suffix) (location, __VA_ARGS__); \
+}
+
+#else /* G_HAVE_ISO_VARARGS */
+#if G_HAVE_GNUC_VARARGS
+
+#define set_uniform_v(gl_suffix, c_type, debug_stride, debug_str, args...) \
+void \
+G_PASTE(gst_gl_shader_set_uniform_,gl_suffix) (GstGLShader * shader, \
+ const gchar * name, guint count, const c_type * value) \
+{ \
+ guint i; \
+ set_uniform_pre_check(shader, name) \
+ for (i = 0; i < count; i++) { \
+ const c_type * item = &value[i * debug_stride]; \
+ GST_TRACE_OBJECT (shader, "Setting uniform %s (%i) index %i to " \
+ debug_str, name, location, i, ##args); \
+ } \
+ shader->context->gl_vtable->G_PASTE(Uniform,gl_suffix) (location, count, value); \
+}
+
+#define set_uniform_func_decl(gl_suffix, args...) \
+void \
+G_PASTE(gst_gl_shader_set_uniform_,gl_suffix) (GstGLShader * shader, \
+ const gchar * name, ##args)
+
+#define set_uniform_body(gl_suffix, debug_str, args...) \
+{ \
+ set_uniform_pre_check(shader, name) \
+ GST_TRACE_OBJECT (shader, "Setting uniform %s (%i) = " debug_str, \
+ name, location, ##args); \
+ shader->context->gl_vtable->G_PASTE(Uniform,gl_suffix) (location, ##args); \
+}
+
+#else
+
+#error "No vararg support in C macros. What kind of C compiler is this?!"
+
+#endif /* G_HAVE_GNUC_VARARGS */
+#endif /* G_HAVE_ISO_VARARGS */
+
+/* *INDENT-OFF* */
/**
* gst_gl_shader_set_uniform_1f:
* @shader: a #GstGLShader
*
* Perform glUniform1f() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_1f (GstGLShader * shader, const gchar * name,
- gfloat value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
-
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform1f (location, value);
-}
+set_uniform_func_decl(1f, float value)
+set_uniform_body(1f, "%f", value);
/**
* gst_gl_shader_set_uniform_1fv:
*
* Perform glUniform1fv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_1fv (GstGLShader * shader, const gchar * name,
- guint count, const gfloat * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform1fv (location, count, value);
-}
+set_uniform_v(1fv, float, 1, "%f", item[0]);
/**
* gst_gl_shader_set_uniform_1i:
*
* Perform glUniform1i() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_1i (GstGLShader * shader, const gchar * name,
- gint value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform1i (location, value);
-}
+set_uniform_func_decl(1i, int value)
+set_uniform_body(1i, "%i", value);
/**
* gst_gl_shader_set_uniform_1iv:
*
* Perform glUniform1iv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_1iv (GstGLShader * shader, const gchar * name,
- guint count, const gint * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform1iv (location, count, value);
-}
+set_uniform_v(1iv, int, 1, "%i", item[0]);
/**
* gst_gl_shader_set_uniform_2f:
*
* Perform glUniform2f() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_2f (GstGLShader * shader, const gchar * name,
- gfloat v0, gfloat v1)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform2f (location, v0, v1);
-}
+set_uniform_func_decl(2f, float v0, float v1)
+set_uniform_body(2f, "%f, %f", v0, v1);
/**
* gst_gl_shader_set_uniform_2fv:
*
* Perform glUniform2fv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_2fv (GstGLShader * shader, const gchar * name,
- guint count, const gfloat * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform2fv (location, count, value);
-}
+set_uniform_v(2fv, float, 2, "%f, %f", item[0], item[1]);
/**
* gst_gl_shader_set_uniform_2i:
*
* Perform glUniform2i() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_2i (GstGLShader * shader, const gchar * name,
- gint v0, gint v1)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform2i (location, v0, v1);
-}
+set_uniform_func_decl(2i, int v0, int v1)
+set_uniform_body(2i, "%i, %i", v0, v1);
/**
* gst_gl_shader_set_uniform_2iv:
*
* Perform glUniform2iv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_2iv (GstGLShader * shader, const gchar * name,
- guint count, const gint * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform2iv (location, count, value);
-}
+set_uniform_v(2iv, int, 2, "%i, %i", item[0], item[1]);
/**
* gst_gl_shader_set_uniform_3f:
*
* Perform glUniform3f() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_3f (GstGLShader * shader, const gchar * name,
- gfloat v0, gfloat v1, gfloat v2)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform3f (location, v0, v1, v2);
-}
+set_uniform_func_decl(3f, float v0, float v1, float v2)
+set_uniform_body(3f, "%f, %f, %f", v0, v1, v2);
/**
* gst_gl_shader_set_uniform_3fv:
*
* Perform glUniform3fv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_3fv (GstGLShader * shader, const gchar * name,
- guint count, const gfloat * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform3fv (location, count, value);
-}
+set_uniform_v(3fv, float, 3, "%f, %f, %f", item[0], item[1], item[2]);
/**
* gst_gl_shader_set_uniform_3i:
*
* Perform glUniform3i() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_3i (GstGLShader * shader, const gchar * name,
- gint v0, gint v1, gint v2)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform3i (location, v0, v1, v2);
-}
+set_uniform_func_decl(3i, int v0, int v1, int v2)
+set_uniform_body(3i, "%i, %i, %i", v0, v1, v2);
/**
* gst_gl_shader_set_uniform_3iv:
*
* Perform glUniform3iv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_3iv (GstGLShader * shader, const gchar * name,
- guint count, const gint * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform3iv (location, count, value);
-}
+set_uniform_v(3iv, int, 3, "%i, %i, %i", item[0], item[1], item[2]);
/**
* gst_gl_shader_set_uniform_4f:
*
* Perform glUniform4f() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_4f (GstGLShader * shader, const gchar * name,
- gfloat v0, gfloat v1, gfloat v2, gfloat v3)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform4f (location, v0, v1, v2, v3);
-}
+set_uniform_func_decl(4f, float v0, float v1, float v2, float v3)
+set_uniform_body(4f, "%f, %f, %f, %f", v0, v1, v2, v3);
/**
* gst_gl_shader_set_uniform_4fv:
*
* Perform glUniform4fv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_4fv (GstGLShader * shader, const gchar * name,
- guint count, const gfloat * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform4fv (location, count, value);
-}
+set_uniform_v(4fv, float, 4, "%f, %f, %f, %f", item[0], item[1], item[2], item[3]);
/**
* gst_gl_shader_set_uniform_4i:
*
* Perform glUniform4i() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_4i (GstGLShader * shader, const gchar * name,
- gint v0, gint v1, gint v2, gint v3)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform4i (location, v0, v1, v2, v3);
-}
+set_uniform_func_decl(4i, int v0, int v1, int v2, int v3)
+set_uniform_body(4i, "%i, %i, %i, %i", v0, v1, v2, v3);
/**
* gst_gl_shader_set_uniform_4iv:
*
* Perform glUniform4iv() for @name on @shader
*/
-void
-gst_gl_shader_set_uniform_4iv (GstGLShader * shader, const gchar * name,
- guint count, const gint * value)
-{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->Uniform4iv (location, count, value);
-}
+set_uniform_v(4iv, int, 4, "%i, %i, %i, %i", item[0], item[1], item[2], item[3]);
+/* *INDENT-ON* */
/**
* gst_gl_shader_set_uniform_matrix_2fv:
gst_gl_shader_set_uniform_matrix_2fv (GstGLShader * shader, const gchar * name,
gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix2fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix2fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_3fv (GstGLShader * shader, const gchar * name,
gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix3fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix3fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_4fv (GstGLShader * shader, const gchar * name,
gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix4fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix4fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_2x3fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix2x3fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix2x3fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_2x4fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix2x4fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix2x4fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_3x2fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix3x2fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix3x2fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_3x4fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix3x4fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix3x4fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_4x2fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix4x2fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix4x2fv (location, count, transpose,
+ value);
}
/**
gst_gl_shader_set_uniform_matrix_4x3fv (GstGLShader * shader,
const gchar * name, gint count, gboolean transpose, const gfloat * value)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
- GLint location = -1;
-
- g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
-
- location = _get_uniform_location (shader, name);
-
- gl->UniformMatrix4x3fv (location, count, transpose, value);
+ set_uniform_pre_check (shader, name);
+ shader->context->gl_vtable->UniformMatrix4x3fv (location, count, transpose,
+ value);
}
/**
GLint
gst_gl_shader_get_attribute_location (GstGLShader * shader, const gchar * name)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
gint ret;
g_return_val_if_fail (shader != NULL, -1);
- priv = shader->priv;
- g_return_val_if_fail (priv->program_handle != 0, -1);
-
- gl = shader->context->gl_vtable;
+ g_return_val_if_fail (shader->priv->program_handle != 0, -1);
- ret = gl->GetAttribLocation (priv->program_handle, name);
+ ret =
+ shader->context->gl_vtable->GetAttribLocation (shader->priv->
+ program_handle, name);
GST_TRACE_OBJECT (shader, "retreived program %i attribute \'%s\' location %i",
- (int) priv->program_handle, name, ret);
+ (int) shader->priv->program_handle, name, ret);
return ret;
}
gst_gl_shader_bind_attribute_location (GstGLShader * shader, GLuint index,
const gchar * name)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
-
g_return_if_fail (shader != NULL);
- priv = shader->priv;
- g_return_if_fail (priv->program_handle != 0);
- gl = shader->context->gl_vtable;
+ g_return_if_fail (shader->priv->program_handle != 0);
GST_TRACE_OBJECT (shader, "binding program %i attribute \'%s\' location %i",
- (int) priv->program_handle, name, index);
+ (int) shader->priv->program_handle, name, index);
- gl->BindAttribLocation (priv->program_handle, index, name);
+ shader->context->gl_vtable->BindAttribLocation (shader->priv->program_handle,
+ index, name);
}
/**
gst_gl_shader_bind_frag_data_location (GstGLShader * shader,
guint index, const gchar * name)
{
- GstGLShaderPrivate *priv;
- GstGLFuncs *gl;
-
g_return_if_fail (shader != NULL);
if (!_ensure_program (shader))
g_return_if_fail (shader->priv->program_handle);
- priv = shader->priv;
- gl = shader->context->gl_vtable;
- g_return_if_fail (gl->BindFragDataLocation);
+ g_return_if_fail (shader->context->gl_vtable->BindFragDataLocation);
GST_TRACE_OBJECT (shader, "binding program %i frag data \'%s\' location %i",
- (int) priv->program_handle, name, index);
+ (int) shader->priv->program_handle, name, index);
- gl->BindFragDataLocation (priv->program_handle, index, name);
+ shader->context->gl_vtable->BindFragDataLocation (shader->priv->
+ program_handle, index, name);
}