gstgl.gldisplay
Module for [GLDisplay] class
Types 3
#GstGLDisplay represents a connection to the underlying windowing system. Elements are required to make use of #GstContext to share and propagate a #GstGLDisplay.
There are a number of environment variables that influence the choice of platform and window system specific functionality.
- GST_GL_WINDOW influences the window system to use. Common values are
'x11', 'wayland', 'surfaceless', 'win32' or 'cocoa'.
- GST_GL_PLATFORM influences the OpenGL platform to use. Common values are
'egl', 'glx', 'wgl' or 'cgl'.
- GST_GL_API influences the OpenGL API requested by the OpenGL platform.
Common values are 'opengl', 'opengl3' and 'gles2'.
Certain window systems require a special function to be called toinitialize threading support. As this GStreamer GL library does not preclude concurrent access to the windowing system, it is strongly advised that applications ensure that threading support has been initialized before any other toolkit/library functionality is accessed. Failure to do so could result in sudden application abortion during execution. The most notably example of such a function is X11's XInitThreads\().
GLDisplayGidBuilder builder()Get builder for [gstgl.gldisplay.GLDisplay] Returns: New builder objectgstgl.gldisplay.GLDisplay newWithType(gstgl.types.GLDisplayType type)Will always return a #GstGLDisplay of a single type. This differs from [gstgl.gldisplay.GLDisplay.new] and the seemingly equivalent call gstgldisplaynewwithtype (GSTGLDISPLAYTYPEANY) in that the l...bool addContext(gstgl.glcontext.GLContext context)bool createContext(gstgl.glcontext.GLContext otherContext, out gstgl.glcontext.GLContext pContext)It requires the display's object lock to be held.bool ensureContext(gstgl.glcontext.GLContext otherContext = null, gstgl.glcontext.GLContext context = null)Ensures that the display has a valid GL context for the current thread. If context already contains a valid context, this does nothing.void filterGlApi(gstgl.types.GLAPI glApi)limit the use of OpenGL to the requested gl_api. This is intended to allow application and elements to request a specific set of OpenGL API's based on what they support. See [gstgl.glcontext.GLCo...gstgl.glwindow.GLWindow findWindow(void * data, glib.types.CompareFunc compareFunc)Execute comparefunc over the list of windows stored by display. The first argument to comparefunc is the #GstGLWindow being checked and the second argument is data.gstgl.types.GLAPI getGlApi()see [gstgl.gldisplay.GLDisplay.filterGlApi] for what the returned value represents Returns: the #GstGLAPI configured for displaysize_t getHandle()void removeContext(gstgl.glcontext.GLContext context)Must be called with the object lock held.bool removeWindow(gstgl.glwindow.GLWindow window)gstgl.glwindow.GLWindow retrieveWindow(void * data, glib.types.CompareFunc compareFunc)Execute comparefunc over the list of windows stored by display. The first argument to comparefunc is the #GstGLWindow being checked and the second argument is data.gulong connectCreateContext(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T : gstgl.glcontext.GLContext)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gstgl.glcontext.GLContext)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gstgl.gldisplay.GLDisplay)))
&& Parameters!T.length < 3)Connect to `CreateContext` signal.