#[repr(C)]pub struct retro_hw_render_callback {
pub context_type: retro_hw_context_type,
pub context_reset: Option<unsafe extern "C" fn()>,
pub get_current_framebuffer: Option<unsafe extern "C" fn() -> usize>,
pub get_proc_address: Option<unsafe extern "C" fn(*const i8) -> Option<unsafe extern "C" fn()>>,
pub depth: bool,
pub stencil: bool,
pub bottom_left_origin: bool,
pub version_major: u32,
pub version_minor: u32,
pub cache_context: bool,
pub context_destroy: Option<unsafe extern "C" fn()>,
pub debug_context: bool,
}Fields§
§context_type: retro_hw_context_typeWhich API to use. Set by libretro core.
context_reset: Option<unsafe extern "C" fn()>Called when a context has been created or when it has been reset. An OpenGL context is only valid after context_reset() has been called.
When context_reset is called, OpenGL resources in the libretro implementation are guaranteed to be invalid.
It is possible that context_reset is called multiple times during an application lifecycle. If context_reset is called without any notification (context_destroy), the OpenGL context was lost and resources should just be recreated without any attempt to “free” old resources.
get_current_framebuffer: Option<unsafe extern "C" fn() -> usize>Set by frontend. TODO: This is rather obsolete. The frontend should not be providing preallocated framebuffers.
get_proc_address: Option<unsafe extern "C" fn(*const i8) -> Option<unsafe extern "C" fn()>>Set by frontend. Can return all relevant functions, including glClear on Windows.
depth: boolSet if render buffers should have depth component attached. TODO: Obsolete.
stencil: boolSet if stencil buffers should be attached. TODO: Obsolete.
bottom_left_origin: boolUse conventional bottom-left origin convention. If false, standard libretro top-left origin semantics are used. TODO: Move to GL specific interface.
version_major: u32Major version number for core GL context or GLES 3.1+.
version_minor: u32Minor version number for core GL context or GLES 3.1+.
cache_context: boolIf this is true, the frontend will go very far to avoid resetting context in scenarios like toggling fullscreen, etc. TODO: Obsolete? Maybe frontend should just always assume this …
context_destroy: Option<unsafe extern "C" fn()>A callback to be called before the context is destroyed in a controlled way by the frontend.
debug_context: boolCreates a debug context.
Trait Implementations§
Source§impl Clone for retro_hw_render_callback
impl Clone for retro_hw_render_callback
Source§fn clone(&self) -> retro_hw_render_callback
fn clone(&self) -> retro_hw_render_callback
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more