Sink: limit GL APIs to OpenGL3+ and GLES2+

Only allow using OpenGL 3.2+ or OpenGL ES 2.0+. This is what GTK4 supports.

#59
This commit is contained in:
Rafał Dzięgiel
2021-03-29 14:38:19 +02:00
parent a6316c940c
commit 3fd30e41bf

View File

@@ -52,6 +52,8 @@
GST_DEBUG_CATEGORY (gst_debug_clapper_gl_widget); GST_DEBUG_CATEGORY (gst_debug_clapper_gl_widget);
#define GST_CAT_DEFAULT gst_debug_clapper_gl_widget #define GST_CAT_DEFAULT gst_debug_clapper_gl_widget
#define SUPPORTED_GL_APIS GST_GL_API_OPENGL3 | GST_GL_API_GLES2
#define DEFAULT_FORCE_ASPECT_RATIO TRUE #define DEFAULT_FORCE_ASPECT_RATIO TRUE
#define DEFAULT_PAR_N 0 #define DEFAULT_PAR_N 0
#define DEFAULT_PAR_D 1 #define DEFAULT_PAR_D 1
@@ -999,6 +1001,7 @@ gtk_clapper_gl_widget_init (GtkClapperGLWidget * clapper_widget)
priv->display = gst_gl_display_new (); priv->display = gst_gl_display_new ();
GST_INFO ("Created %" GST_PTR_FORMAT, priv->display); GST_INFO ("Created %" GST_PTR_FORMAT, priv->display);
gst_gl_display_filter_gl_api (priv->display, SUPPORTED_GL_APIS);
gtk_gl_area_set_auto_render (GTK_GL_AREA (widget), FALSE); gtk_gl_area_set_auto_render (GTK_GL_AREA (widget), FALSE);
} }