[][src]Trait sokol::app::SApp

pub trait SApp {
    fn sapp_init(&mut self);
fn sapp_frame(&mut self);
fn sapp_cleanup(&mut self);
fn sapp_event(&mut self, event: SAppEvent); fn sapp_fail(&mut self, msg: &str) { ... }
fn saudio_stream(
        &mut self,
        buffer: &mut [f32],
        num_frames: i32,
        num_channels: i32
    ) { ... } }

Required methods

fn sapp_init(&mut self)

Init callback function.

fn sapp_frame(&mut self)

Frame callback function.

fn sapp_cleanup(&mut self)

Cleanup callback function.

fn sapp_event(&mut self, event: SAppEvent)

Event callback function.

Loading content...

Provided methods

fn sapp_fail(&mut self, msg: &str)

Optional sokol_app error reporting callback function.

fn saudio_stream(
    &mut self,
    buffer: &mut [f32],
    num_frames: i32,
    num_channels: i32
)

Function called by sokol_audio in callback mode.

The default implementation clears the buffer to zero. Applications using this mode are expected to mix audio data into the buffer.

This is called from a separate thread on all desktop platforms.

Loading content...

Implementors

Loading content...