#[repr(C)]pub struct retro_hw_render_callback {
pub context_type: retro_hw_context_type,
pub context_reset: retro_hw_context_reset_t,
pub get_current_framebuffer: retro_hw_get_current_framebuffer_t,
pub get_proc_address: retro_hw_get_proc_address_t,
pub depth: bool,
pub stencil: bool,
pub bottom_left_origin: bool,
pub version_major: c_uint,
pub version_minor: c_uint,
pub cache_context: bool,
pub context_destroy: retro_hw_context_reset_t,
pub debug_context: bool,
}Fields
context_type: retro_hw_context_typeWhich API to use. Set by libretro core.
context_reset: retro_hw_context_reset_tCalled 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: retro_hw_get_current_framebuffer_tSet by frontend. TODO: This is rather obsolete. The frontend should not be providing preallocated framebuffers.
get_proc_address: retro_hw_get_proc_address_tSet 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: c_uintMajor version number for core GL context or GLES 3.1+.
version_minor: c_uintMinor 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: retro_hw_context_reset_tA callback to be called before the context is destroyed in a controlled way by the frontend.
debug_context: boolCreates a debug context.
Trait Implementations
sourceimpl Clone for retro_hw_render_callback
impl Clone for retro_hw_render_callback
sourcefn clone(&self) -> retro_hw_render_callback
fn clone(&self) -> retro_hw_render_callback
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for retro_hw_render_callback
impl Debug for retro_hw_render_callback
impl Copy for retro_hw_render_callback
Auto Trait Implementations
impl RefUnwindSafe for retro_hw_render_callback
impl Send for retro_hw_render_callback
impl Sync for retro_hw_render_callback
impl Unpin for retro_hw_render_callback
impl UnwindSafe for retro_hw_render_callback
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
