Trait gstreamer_gl::prelude::GLContextExtManual
source · 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§
sourcefn gl_context(&self) -> uintptr_t
fn gl_context(&self) -> uintptr_t
sourcefn proc_address(&self, name: &str) -> uintptr_t
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