Trait SimpleFFGLInstance

Source
pub trait SimpleFFGLInstance: FFGLInstance {
    // Required methods
    fn new(inst_data: &FFGLData) -> Self;
    fn plugin_info() -> PluginInfo;
    fn draw(&mut self, inst_data: &FFGLData, frame_data: GLInput<'_>);

    // Provided methods
    fn num_params() -> usize { ... }
    fn param_info(_index: usize) -> &'static dyn ParamInfo { ... }
    fn get_param(&self, _index: usize) -> f32 { ... }
    fn set_param(&mut self, _index: usize, _value: f32) { ... }
}
Expand description

Implement this trait for a plugin without any static state

Required Methods§

Source

fn new(inst_data: &FFGLData) -> Self

Source

fn plugin_info() -> PluginInfo

Source

fn draw(&mut self, inst_data: &FFGLData, frame_data: GLInput<'_>)

Called by crate::conversions::Op::ProcessOpenGL to draw the plugin

Provided Methods§

Source

fn num_params() -> usize

Source

fn param_info(_index: usize) -> &'static dyn ParamInfo

Source

fn get_param(&self, _index: usize) -> f32

Source

fn set_param(&mut self, _index: usize, _value: f32)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§