Trait adi_gpu_base::Display[][src]

pub trait Display {
    fn color(&mut self, color: (f32, f32, f32));
fn fog(&mut self, fog: Option<(f32, f32)>);
fn update(&mut self) -> Option<Input>;
fn camera(&mut self, position: Vec3, rotation: Vec3);
fn model(&mut self, vertices: &[f32], fans: Vec<(u32, u32)>) -> Model;
fn texture(&mut self, graphic: &Graphic) -> Texture;
fn gradient(&mut self, colors: &[f32]) -> Gradient;
fn texcoords(&mut self, texcoords: &[f32]) -> TexCoords;
fn set_texture(&mut self, texture: &mut Texture, pixels: &[u32]);
fn shape_solid(
        &mut self,
        model: &Model,
        transform: Transform,
        color: [f32; 4],
        blending: bool,
        fog: bool,
        camera: bool
    ) -> Shape;
fn shape_gradient(
        &mut self,
        model: &Model,
        transform: Transform,
        gradient: Gradient,
        blending: bool,
        fog: bool,
        camera: bool
    ) -> Shape;
fn shape_texture(
        &mut self,
        model: &Model,
        transform: Transform,
        texture: &Texture,
        tc: TexCoords,
        blending: bool,
        fog: bool,
        camera: bool
    ) -> Shape;
fn shape_faded(
        &mut self,
        model: &Model,
        transform: Transform,
        texture: &Texture,
        tc: TexCoords,
        alpha: f32,
        fog: bool,
        camera: bool
    ) -> Shape;
fn shape_tinted(
        &mut self,
        model: &Model,
        transform: Transform,
        texture: &Texture,
        tc: TexCoords,
        tint: [f32; 4],
        blending: bool,
        fog: bool,
        camera: bool
    ) -> Shape;
fn shape_complex(
        &mut self,
        model: &Model,
        transform: Transform,
        texture: &Texture,
        tc: TexCoords,
        gradient: Gradient,
        blending: bool,
        fog: bool,
        camera: bool
    ) -> Shape;
fn transform(&mut self, shape: &Shape, transform: Transform);
fn resize(&mut self, wh: (u32, u32));
fn wh(&self) -> (u32, u32); }

A trait for a Display

Required Methods

Set the background color for the Display.

  • color: The background color for the display.

Set the fog for the display.

  • fog: None for no fog, otherwise set fog begin distance and fog end distance.

Get input, if there's any. If there's no input, update the Display and return None.

Move the camera.

  • position: position of the camera.
  • rotation: rotation of the camera.

Create a new Model for this Display.

Create a new Texture for this Display.

Create a new Gradient for this Display.

Create new TexCoords for this Display.

Set the pixels for a Texture.

Create a new shape with a solid color.

Create a new shape shaded by a gradient (1 color per vertex).

Create a new shape shaded by a texture using texture coordinates.

Texture Coordinates follow this format (X, Y, UNUSED(1.0), ALPHA)

Create a new shape shaded by a texture using texture coordinates and alpha.

Texture Coordinates follow this format (X, Y, UNUSED(1.0), ALPHA)

Create a new shape shaded by a texture using texture coordinates and tint.

Texture Coordinates follow this format (X, Y, UNUSED(1.0), ALPHA)

Create a new shape shaded by a texture using texture coordinates and tint per vertex.

Texture Coordinates follow this format (X, Y, UNUSED(1.0), ALPHA)

Transform the shape.

Resize the display.

Get the width and height of the window, as a tuple.

Implementors