mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
glsl: Enable GLSL 1.30 if we have OpenGL 3.0/3.1
As implemented, we only support OpenGL 3 API from version 3.2. Though, there is no issue enabling GLSL 1.30 even if we are going to restrict our API usage to 2. This allows using texelFetch() on OpenGL 3.0 and 3.1 drivers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2190>
This commit is contained in:
parent
4b4d607f4c
commit
77a88c4572
1 changed files with 6 additions and 1 deletions
|
@ -897,7 +897,12 @@ _mangle_version_profile_from_gl_api (GstGLContext * context,
|
|||
*profile = GST_GLSL_PROFILE_ES;
|
||||
}
|
||||
} else if (gl_api & GST_GL_API_OPENGL) {
|
||||
*version = GST_GLSL_VERSION_110;
|
||||
/* We only use GST_GL_API_OPENGL3 from 3.1, but nothing prevents us from
|
||||
* using 3.0/1.30 GLSSL with GL2 API */
|
||||
if (gl_major >= 3)
|
||||
*version = GST_GLSL_VERSION_130;
|
||||
else
|
||||
*version = GST_GLSL_VERSION_110;
|
||||
*profile = GST_GLSL_PROFILE_COMPATIBILITY;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue