#[non_exhaustive]pub enum Program {
Sprite,
TileChunk,
Blit,
Text,
}Expand description
One of the renderer’s programs, for
Renderer::reload_program.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Sprite
Instanced sprites, textured and tinted.
TileChunk
Instanced tiles, a chunk of a tile layer at a time.
Blit
The integer upscale of the virtual image into the output.
Text
Instanced glyphs of texts: the sprite’s quads, with the texture’s alpha as a mask in the tint’s color.
Implementations§
Source§impl Program
impl Program
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Its name: its folder under SHADER_DIR, and its pipeline’s label.
Sourcepub fn vertex_file(self) -> &'static str
pub fn vertex_file(self) -> &'static str
Its vertex shader’s file, under SHADER_DIR, such as
sprite/sprite.vert.glsl.
Sourcepub fn fragment_file(self) -> &'static str
pub fn fragment_file(self) -> &'static str
Its fragment shader’s file, under SHADER_DIR, such as
sprite/sprite.frag.glsl.
Trait Implementations§
impl Copy for Program
impl Eq for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Forget for Program
impl Freeze for Program
impl Move for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more