#[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_type
Which API to use. Set by libretro core.
context_reset: retro_hw_context_reset_t
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: retro_hw_get_current_framebuffer_t
Set by frontend. TODO: This is rather obsolete. The frontend should not be providing preallocated framebuffers.
get_proc_address: retro_hw_get_proc_address_t
Set by frontend. Can return all relevant functions, including glClear on Windows.
depth: bool
Set if render buffers should have depth component attached. TODO: Obsolete.
stencil: bool
Set if stencil buffers should be attached. TODO: Obsolete.
bottom_left_origin: bool
Use conventional bottom-left origin convention. If false, standard libretro top-left origin semantics are used. TODO: Move to GL specific interface.
version_major: c_uint
Major version number for core GL context or GLES 3.1+.
version_minor: c_uint
Minor version number for core GL context or GLES 3.1+.
cache_context: bool
If 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_t
A callback to be called before the context is destroyed in a controlled way by the frontend.
debug_context: bool
Creates 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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more