mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
glshader: some compatibility changes for GL 1.4
GL 1.4 (with GL_ARB_shader_objects) doesn't have glIsProgram or glIsShader equivalents. As they are simply assertions, skip them when there isn't a valid function pointer.
This commit is contained in:
parent
c1d49430ec
commit
fdca1dec0d
2 changed files with 11 additions and 7 deletions
|
@ -458,9 +458,11 @@ gst_gl_shader_detach_unlocked (GstGLShader * shader, GstGLSLStage * stage)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (shader->context->gl_vtable->IsProgram (shader->priv->
|
if (shader->context->gl_vtable->IsProgram)
|
||||||
program_handle));
|
g_assert (shader->context->gl_vtable->IsProgram (shader->
|
||||||
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
|
priv->program_handle));
|
||||||
|
if (shader->context->gl_vtable->IsShader)
|
||||||
|
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
|
||||||
|
|
||||||
GST_LOG_OBJECT (shader, "detaching shader %i from program %i", stage_handle,
|
GST_LOG_OBJECT (shader, "detaching shader %i from program %i", stage_handle,
|
||||||
(int) shader->priv->program_handle);
|
(int) shader->priv->program_handle);
|
||||||
|
@ -533,9 +535,11 @@ gst_gl_shader_attach_unlocked (GstGLShader * shader, GstGLSLStage * stage)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_assert (shader->context->gl_vtable->IsProgram (shader->priv->
|
if (shader->context->gl_vtable->IsProgram)
|
||||||
program_handle));
|
g_assert (shader->context->gl_vtable->IsProgram (shader->
|
||||||
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
|
priv->program_handle));
|
||||||
|
if (shader->context->gl_vtable->IsShader)
|
||||||
|
g_assert (shader->context->gl_vtable->IsShader (stage_handle));
|
||||||
|
|
||||||
shader->priv->stages =
|
shader->priv->stages =
|
||||||
g_list_prepend (shader->priv->stages, gst_object_ref_sink (stage));
|
g_list_prepend (shader->priv->stages, gst_object_ref_sink (stage));
|
||||||
|
|
|
@ -471,7 +471,7 @@ _compile_shader (GstGLContext * context, struct compile *data)
|
||||||
/* FIXME: supported threaded GLSL compilers and don't destroy compilation
|
/* FIXME: supported threaded GLSL compilers and don't destroy compilation
|
||||||
* performance by getting the compilation result directly after compilation */
|
* performance by getting the compilation result directly after compilation */
|
||||||
status = GL_FALSE;
|
status = GL_FALSE;
|
||||||
gl->GetShaderiv (priv->handle, GL_COMPILE_STATUS, &status);
|
vtable->GetShaderiv (priv->handle, GL_COMPILE_STATUS, &status);
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
vtable->GetShaderInfoLog (priv->handle, sizeof (info_buffer) - 1, &len,
|
vtable->GetShaderInfoLog (priv->handle, sizeof (info_buffer) - 1, &len,
|
||||||
|
|
Loading…
Reference in a new issue