#[repr(C)]pub struct mpv_opengl_init_params {
pub get_proc_address: Option<unsafe extern "C" fn(ctx: *mut c_void, name: *const c_char) -> *mut c_void>,
pub get_proc_address_ctx: *mut c_void,
}
Expand description
For initializing the mpv OpenGL state via MPV_RENDER_PARAM_OPENGL_INIT_PARAMS.
Fields§
§get_proc_address: Option<unsafe extern "C" fn(ctx: *mut c_void, name: *const c_char) -> *mut c_void>
This retrieves OpenGL function pointers, and will use them in subsequent operation. Usually, you can simply call the GL context APIs from this callback (e.g. glXGetProcAddressARB or wglGetProcAddress), but some APIs do not always return pointers for all standard functions (even if present); in this case you have to compensate by looking up these functions yourself when libmpv wants to resolve them through this callback. libmpv will not normally attempt to resolve GL functions on its own, nor does it link to GL libraries directly.
get_proc_address_ctx: *mut c_void
Value passed as ctx parameter to get_proc_address().
Trait Implementations§
Source§impl Clone for mpv_opengl_init_params
impl Clone for mpv_opengl_init_params
Source§fn clone(&self) -> mpv_opengl_init_params
fn clone(&self) -> mpv_opengl_init_params
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for mpv_opengl_init_params
impl Debug for mpv_opengl_init_params
impl Copy for mpv_opengl_init_params
Auto Trait Implementations§
impl Freeze for mpv_opengl_init_params
impl RefUnwindSafe for mpv_opengl_init_params
impl !Send for mpv_opengl_init_params
impl !Sync for mpv_opengl_init_params
impl Unpin for mpv_opengl_init_params
impl UnwindSafe for mpv_opengl_init_params
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more