mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-27 00:16:37 +00:00
glcontext: build errors when GST_GL_HAVE_OPENGL is 0
Moving variables within #if GST_GL_HAVE_OPENGL, which are not going to be used otherwise. and which are needed only when OpenGl is present https://bugzilla.gnome.org/show_bug.cgi?id=740235
This commit is contained in:
parent
e731762984
commit
d747c65d4c
1 changed files with 6 additions and 0 deletions
|
@ -445,7 +445,9 @@ GstGLAPI
|
||||||
gst_gl_context_get_current_gl_api (guint * major, guint * minor)
|
gst_gl_context_get_current_gl_api (guint * major, guint * minor)
|
||||||
{
|
{
|
||||||
const GLubyte *(*GetString) (GLenum name);
|
const GLubyte *(*GetString) (GLenum name);
|
||||||
|
#if GST_GL_HAVE_OPENGL
|
||||||
void (*GetIntegerv) (GLenum name, GLuint * n);
|
void (*GetIntegerv) (GLenum name, GLuint * n);
|
||||||
|
#endif
|
||||||
const gchar *version;
|
const gchar *version;
|
||||||
gint maj, min, n;
|
gint maj, min, n;
|
||||||
GstGLAPI ret = (1 << 31);
|
GstGLAPI ret = (1 << 31);
|
||||||
|
@ -455,8 +457,10 @@ gst_gl_context_get_current_gl_api (guint * major, guint * minor)
|
||||||
while (ret != GST_GL_API_NONE) {
|
while (ret != GST_GL_API_NONE) {
|
||||||
/* FIXME: attempt to delve into the platform specific GetProcAddress */
|
/* FIXME: attempt to delve into the platform specific GetProcAddress */
|
||||||
GetString = gst_gl_context_default_get_proc_address (ret, "glGetString");
|
GetString = gst_gl_context_default_get_proc_address (ret, "glGetString");
|
||||||
|
#if GST_GL_HAVE_OPENGL
|
||||||
GetIntegerv =
|
GetIntegerv =
|
||||||
gst_gl_context_default_get_proc_address (ret, "glGetIntegerv");
|
gst_gl_context_default_get_proc_address (ret, "glGetIntegerv");
|
||||||
|
#endif
|
||||||
if (!GetString) {
|
if (!GetString) {
|
||||||
goto next;
|
goto next;
|
||||||
}
|
}
|
||||||
|
@ -490,7 +494,9 @@ gst_gl_context_get_current_gl_api (guint * major, guint * minor)
|
||||||
|
|
||||||
goto next;
|
goto next;
|
||||||
} else {
|
} else {
|
||||||
|
#if GST_GL_HAVE_OPENGL
|
||||||
GLuint context_flags = 0;
|
GLuint context_flags = 0;
|
||||||
|
#endif
|
||||||
sscanf (version, "%d.%d", &maj, &min);
|
sscanf (version, "%d.%d", &maj, &min);
|
||||||
|
|
||||||
if (maj <= 0 || min < 0)
|
if (maj <= 0 || min < 0)
|
||||||
|
|
Loading…
Reference in a new issue