mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 20:12:28 +00:00
glshader: attribute locations are -1 on error
This commit is contained in:
parent
40a4530c5d
commit
a29a18cc3a
2 changed files with 5 additions and 5 deletions
|
@ -222,8 +222,8 @@ gst_gl_test_src_shader (GstGLTestSrc * v, GstBuffer * buffer, int w, int h)
|
||||||
|
|
||||||
GLushort indices[] = { 0, 1, 2, 3, 0 };
|
GLushort indices[] = { 0, 1, 2, 3, 0 };
|
||||||
|
|
||||||
GLint attr_position_loc = 0;
|
GLint attr_position_loc = -1;
|
||||||
GLint attr_uv_loc = 0;
|
GLint attr_uv_loc = -1;
|
||||||
|
|
||||||
if (gst_gl_context_get_gl_api (v->context)) {
|
if (gst_gl_context_get_gl_api (v->context)) {
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ gst_gl_test_src_checkers (GstGLTestSrc * v, gint checker_width)
|
||||||
|
|
||||||
GLushort indices[] = { 0, 1, 2, 3, 0 };
|
GLushort indices[] = { 0, 1, 2, 3, 0 };
|
||||||
|
|
||||||
GLint attr_position_loc = 0;
|
GLint attr_position_loc = -1;
|
||||||
|
|
||||||
if (gst_gl_context_get_gl_api (v->context)) {
|
if (gst_gl_context_get_gl_api (v->context)) {
|
||||||
|
|
||||||
|
|
|
@ -1167,9 +1167,9 @@ gst_gl_shader_get_attribute_location (GstGLShader * shader, const gchar * name)
|
||||||
GstGLShaderPrivate *priv;
|
GstGLShaderPrivate *priv;
|
||||||
GstGLFuncs *gl;
|
GstGLFuncs *gl;
|
||||||
|
|
||||||
g_return_val_if_fail (shader != NULL, 0);
|
g_return_val_if_fail (shader != NULL, -1);
|
||||||
priv = shader->priv;
|
priv = shader->priv;
|
||||||
g_return_val_if_fail (priv->program_handle != 0, 0);
|
g_return_val_if_fail (priv->program_handle != 0, -1);
|
||||||
if (0 == priv->vertex_handle)
|
if (0 == priv->vertex_handle)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue