Exemplo n.º 1
0
/**
 * gst_gl_shader_bind_attribute_location:
 * @shader: a #GstGLShader
 * @index: attribute index to set
 * @name: name of the attribute
 *
 * Bind attribute @name to the specified location @index using
 * glBindAttributeLocation().
 */
void
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;

  GST_TRACE_OBJECT (shader, "binding program %i attribute \'%s\' location %i",
      (int) priv->program_handle, name, index);

  gl->BindAttribLocation (priv->program_handle, index, name);
}