Struct adi_gpu_opengl::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 Texture = Texture
fn new<G: AsRef<Graphic>>(title: &str, icon: G) -> 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) -> Option<Input>
[src]
Get input, if there's any. If there's no input, update the Display
and return None
. Read more
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<G: AsRef<Graphic>>(&mut self, graphic: G) -> 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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
color: [f32; 4],
blending: 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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
colors: Gradient,
blending: 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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
blending: 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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
alpha: f32,
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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tint: [f32; 4],
blending: 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,
fog: bool,
camera: bool
) -> Shape
[src]
&mut self,
model: &Model,
transform: Mat4,
texture: Texture,
tc: TexCoords,
tints: Gradient,
blending: 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 Shape, transform: Mat4)
[src]
Transform the shape.
fn resize(&mut self, wh: (u32, u32))
[src]
Resize the display.
fn wh(&self) -> (u32, u32)
[src]
Get the width and height of the window, as a tuple.