Trait gstreamer_gl::prelude::GLDisplayExt [−][src]
pub trait GLDisplayExt: 'static { fn add_context<P: IsA<GLContext>>(
&self,
context: &P
) -> Result<(), BoolError>; fn create_context<P: IsA<GLContext>>(
&self,
other_context: &P
) -> Result<GLContext, Error>; 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_context<P: IsA<GLContext>>(&self, context: &P); fn remove_window<P: IsA<GLWindow>>(
&self,
window: &P
) -> Result<(), BoolError>; fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; }
Required methods
fn add_context<P: IsA<GLContext>>(&self, context: &P) -> Result<(), BoolError>
[src]
context
Returns
whether context
was successfully added. false
may be returned
if there already exists another context for context
’s active thread.
Must be called with the object lock held.
fn create_context<P: IsA<GLContext>>(
&self,
other_context: &P
) -> Result<GLContext, Error>
[src]
&self,
other_context: &P
) -> Result<GLContext, Error>
It requires the display’s object lock to be held.
other_context
other crate::GLContext
to share resources with.
p_context
resulting crate::GLContext
Returns
whether a new context could be created.
fn create_window(&self) -> Result<GLWindow, BoolError>
[src]
Returns
a new crate::GLWindow
for self
or None
.
fn filter_gl_api(&self, gl_api: GLAPI)
[src]
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 [crate::prelude::GLContextExt::get_gl_api()
] for the retrieving the
API supported by a crate::GLContext
.
gl_api
a crate::GLAPI
to filter with
fn gl_api(&self) -> GLAPI
[src]
see Self::filter_gl_api()
for what the returned value represents
Returns
the crate::GLAPI
configured for self
fn gl_api_unlocked(&self) -> GLAPI
[src]
fn handle_type(&self) -> GLDisplayType
[src]
Returns
the crate::GLDisplayType
of self
fn remove_context<P: IsA<GLContext>>(&self, context: &P)
[src]
v1_18
only.fn remove_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), BoolError>
[src]
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Overrides the crate::GLContext
(XXX: @-reference does not belong to GLDisplayExt!) 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.
Implementors
impl<O: IsA<GLDisplay>> GLDisplayExt for O
[src]
impl<O: IsA<GLDisplay>> GLDisplayExt for O
[src]fn add_context<P: IsA<GLContext>>(&self, context: &P) -> Result<(), BoolError>
[src]
fn create_context<P: IsA<GLContext>>(
&self,
other_context: &P
) -> Result<GLContext, Error>
[src]
&self,
other_context: &P
) -> Result<GLContext, Error>
fn create_window(&self) -> Result<GLWindow, BoolError>
[src]
fn filter_gl_api(&self, gl_api: GLAPI)
[src]
fn gl_api(&self) -> GLAPI
[src]
fn gl_api_unlocked(&self) -> GLAPI
[src]
fn handle_type(&self) -> GLDisplayType
[src]
fn remove_context<P: IsA<GLContext>>(&self, context: &P)
[src]
fn remove_context<P: IsA<GLContext>>(&self, context: &P)
[src]v1_18
only.fn remove_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), BoolError>
[src]
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId