pub trait GLContextExtManual: Sealed + IsA<GLContext> + 'static {
    // Provided methods
    fn gl_context(&self) -> uintptr_t { ... }
    fn proc_address(&self, name: &str) -> uintptr_t { ... }
    fn thread_add<F: FnOnce(&Self) + Send>(&self, func: F) { ... }
}

Provided Methods§

source

fn gl_context(&self) -> uintptr_t

Gets the backing OpenGL context used by self.

§Returns

The platform specific backing OpenGL context

source

fn proc_address(&self, name: &str) -> uintptr_t

Get a function pointer to a specified opengl function, name. If the the specific function does not exist, NULL is returned instead.

Platform specific functions (names starting ‘egl’, ‘glX’, ‘wgl’, etc) can also be retrieved using this method.

Note: This function may return valid function pointers that may not be valid to call in self. The caller is responsible for ensuring that the returned function is a valid function to call in self by either checking the OpenGL API and version or for an appropriate OpenGL extension.

Note: On success, you need to cast the returned function pointer to the correct type to be able to call it correctly. On 32-bit Windows, this will include the GSTGLAPI identifier to use the correct calling convention. e.g.

⚠️ The following code is in C ⚠️

void (GSTGLAPI *PFN_glGetIntegerv) (GLenum name, GLint * ret)
§name

an opengl function name

§Returns

a function pointer or None

source

fn thread_add<F: FnOnce(&Self) + Send>(&self, func: F)

Execute func in the OpenGL thread of self with data

MT-safe

§func

a GstGLContextThreadFunc

Object Safety§

This trait is not object safe.

Implementors§