Struct retro_hw_render_callback

Source
#[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

Source§

fn clone(&self) -> retro_hw_render_callback

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for retro_hw_render_callback

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for retro_hw_render_callback

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.