pub struct Program { /* private fields */ }
Expand description
A structure representing a GPU program.
Implementations§
Source§impl Program
impl Program
Sourcepub fn resource(&self) -> <Context as HasContext>::Program
pub fn resource(&self) -> <Context as HasContext>::Program
Gets the ProgramResource
object.
pub fn uniform_mat4(&mut self, location: usize, transpose: bool, v: &[f32])
Sourcepub fn bind_texture_2d(
&mut self,
texture: &Texture2D,
sampler: &Sampler,
index: u32,
)
pub fn bind_texture_2d( &mut self, texture: &Texture2D, sampler: &Sampler, index: u32, )
Binds a Texture2D
at index
so it can be sampled with the specified sampler
,
pub fn bind_vec2(&mut self, vec2: (f32, f32), index: u32)
Trait Implementations§
Source§impl AsMut<Program> for RasterProgram
impl AsMut<Program> for RasterProgram
Source§impl AsRef<Program> for RasterProgram
impl AsRef<Program> for RasterProgram
Source§impl Borrow<Program> for RasterProgram
impl Borrow<Program> for RasterProgram
Source§impl BorrowMut<Program> for RasterProgram
impl BorrowMut<Program> for RasterProgram
Source§fn borrow_mut(&mut self) -> &mut Program
fn borrow_mut(&mut self) -> &mut Program
Mutably borrows from an owned value. Read more
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl !Send for Program
impl !Sync for Program
impl Unpin 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