Trait gstreamer_gl::prelude::GLDisplayExt

source ·
pub trait GLDisplayExt:
    IsA<GLDisplay>
    + Sealed
    + 'static {
    // Provided methods
    fn create_window(&self) -> Result<GLWindow, BoolError> { ... }
    fn filter_gl_api(&self, gl_api: GLAPI) { ... }
    fn gl_api(&self) -> GLAPI { ... }
    fn gl_api_unlocked(&self) -> GLAPI { ... }
    fn handle_type(&self) -> GLDisplayType { ... }
    fn remove_window(
        &self,
        window: &impl IsA<GLWindow>,
    ) -> Result<(), BoolError> { ... }
    fn connect_create_context<F: Fn(&Self, &GLContext) -> Option<GLContext> + Send + Sync + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all GLDisplay methods.

§Implementors

GLDisplay

Provided Methods§

source

fn create_window(&self) -> Result<GLWindow, BoolError>

§Returns

a new GLWindow for self or None.

source

fn filter_gl_api(&self, gl_api: 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 GLContextExt::gl_api() for the retrieving the API supported by a GLContext.

§gl_api

a GLAPI to filter with

source

fn gl_api(&self) -> GLAPI

see filter_gl_api() for what the returned value represents

§Returns

the GLAPI configured for self

source

fn gl_api_unlocked(&self) -> GLAPI

source

fn handle_type(&self) -> GLDisplayType

§Returns

the GLDisplayType of self

source

fn remove_window(&self, window: &impl IsA<GLWindow>) -> Result<(), BoolError>

§window

a GLWindow to remove

§Returns

if window could be removed from self

source

fn connect_create_context<F: Fn(&Self, &GLContext) -> Option<GLContext> + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

Overrides the GLContext creation mechanism. It can be called in any thread and it is emitted with display’s object lock held.

§context

other context to share resources with.

§Returns

the new context.

Object Safety§

This trait is not object safe.

Implementors§