[][src]Struct gstreamer_gl::GLContext

pub struct GLContext(_, _);

GLContext wraps an OpenGL context object in a uniform API. As a result of the limitation on OpenGL context, this object is not thread safe unless specified and must only be activated in a single thread.

Implements

GLContextExt, gst::ObjectExt, glib::object::ObjectExt, GLContextExtManual

Implementations

impl GLContext[src]

pub fn new<P: IsA<GLDisplay>>(display: &P) -> GLContext[src]

Create a new GLContext with the specified display

display

a GLDisplay

Returns

a new GLContext

pub fn get_current() -> Option<GLContext>[src]

See also GLContextExt::activate.

Returns

the GLContext active in the current thread or None

pub fn get_current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32)[src]

If an error occurs, major and minor are not modified and GLAPI::None is returned.

platform

the GLPlatform to retrieve the API for

major

the major version

minor

the minor version

Returns

The version supported by the OpenGL context current in the calling thread or GLAPI::None

impl GLContext[src]

pub unsafe fn new_wrapped<T: IsA<GLDisplay>>(
    display: &T,
    handle: uintptr_t,
    context_type: GLPlatform,
    available_apis: GLAPI
) -> Option<GLContext>
[src]

Wraps an existing OpenGL context into a GLContext.

Note: The caller is responsible for ensuring that the OpenGL context represented by handle stays alive while the returned GLContext is active.

context_type must not be GLPlatform::None or GLPlatform::Any

available_apis must not be GLAPI::None or GLAPI::Any

display

a GLDisplay

handle

the OpenGL context to wrap

context_type

a GLPlatform specifying the type of context in handle

available_apis

a GLAPI containing the available OpenGL apis in handle

Returns

a GLContext wrapping handle

pub fn get_current_gl_context(context_type: GLPlatform) -> uintptr_t[src]

context_type

a GLPlatform specifying the type of context to retrieve

Returns

The OpenGL context handle current in the calling thread or None

pub fn get_proc_address_with_platform(
    context_type: GLPlatform,
    gl_api: GLAPI,
    name: &str
) -> uintptr_t
[src]

Attempts to use the context_type specific GetProcAddress implementations to retrieve name.

See also GLContext::get_proc_address.

context_type

a GLPlatform

gl_api

a GLAPI

name

the name of the function to retrieve

Returns

a function pointer for name, or None

Trait Implementations

impl Clone for GLContext[src]

impl Debug for GLContext[src]

impl Eq for GLContext[src]

impl Hash for GLContext[src]

impl IsA<Object> for GLContext[src]

impl Ord for GLContext[src]

impl<T: ObjectType> PartialEq<T> for GLContext[src]

impl<T: ObjectType> PartialOrd<T> for GLContext[src]

impl Send for GLContext[src]

impl StaticType for GLContext[src]

impl Sync for GLContext[src]

Auto Trait Implementations

impl RefUnwindSafe for GLContext

impl Unpin for GLContext

impl UnwindSafe for GLContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<O> GObjectExtManualGst for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExt for O where
    O: IsA<Object>, 
[src]

impl<O> GstObjectExtManual for O where
    O: IsA<Object>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.