Struct adi_gpu_vulkan::Display
[−]
[src]
pub struct Display { /* fields omitted */ }
To render anything with adi_gpu, you have to make a Display
Trait Implementations
impl Display for Display
[src]
type Model = Model
type Texture = Texture
type Gradient = Gradient
type TexCoords = TexCoords
type Shape = Shape
fn new(window: &Window) -> Option<Self>
[src]
Create a new GPU-Accelerated Display
. If it can't be created, return None. Read more
fn color(&mut self, color: (f32, f32, f32))
[src]
Set the background color for the Display
. Read more
fn update(&mut self)
[src]
Update the Display
.
fn camera(&mut self, xyz: (f32, f32, f32), rotate_xyz: (f32, f32, f32))
[src]
Move the camera. Read more
fn model(&mut self, vertices: &[f32], indices: &[u32]) -> Model
[src]
Create a new Model
for this Display
.
fn fog(&mut self, fog: Option<(f32, f32)>)
[src]
Set the fog for the display. Read more
fn texture(&mut self, graphic: Graphic) -> Texture
[src]
Create a new Texture
for this Display
.
fn gradient(&mut self, colors: &[f32]) -> Gradient
[src]
Create a new Gradient
for this Display
.
fn texcoords(&mut self, texcoords: &[f32]) -> TexCoords
[src]
Create new TexCoords
for this Display
.
fn set_texture(&mut self, texture: &mut Self::Texture, pixels: &[u32])
[src]
Set the pixels for a Texture
.
fn shape_solid(
&mut self,
model: &Model,
transform: Mat4,
color: [f32; 4],
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
color: [f32; 4],
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape with a solid color.
fn shape_gradient(
&mut self,
model: &Model,
transform: Mat4,
colors: Gradient,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
colors: Gradient,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape shaded by a gradient (1 color per vertex).
fn shape_texture(
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape shaded by a texture using texture coordinates. Read more
fn shape_faded(
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
alpha: f32,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
alpha: f32,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape shaded by a texture using texture coordinates and alpha. Read more
fn shape_tinted(
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tint: [f32; 4],
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tint: [f32; 4],
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape shaded by a texture using texture coordinates and tint. Read more
fn shape_complex(
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tints: Gradient,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tints: Gradient,
blending: bool,
fancy: bool,
fog: bool,
camera: bool
) -> Shape
Create a new shape shaded by a texture using texture coordinates and tint per vertex. Read more
fn transform(&mut self, shape: &mut Self::Shape, transform: &Mat4)
[src]
Transform the shape.
fn resize(&mut self, wh: (u32, u32))
[src]
Resize the display.