pub struct QuadGl { /* private fields */ }
Implementations
sourceimpl QuadGl
impl QuadGl
pub fn new(ctx: &mut Context) -> QuadGl
pub fn make_pipeline(
&mut self,
ctx: &mut Context,
vertex_shader: &str,
fragment_shader: &str,
params: PipelineParams,
uniforms: Vec<(String, UniformType)>,
textures: Vec<String>
) -> Result<GlPipeline, ShaderError>
sourcepub fn clear_draw_calls(&mut self)
pub fn clear_draw_calls(&mut self)
Reset only draw calls state
pub fn draw(&mut self, ctx: &mut Context, projection: Mat4)
pub fn get_projection_matrix(&self) -> Mat4
pub fn get_active_render_pass(&self) -> Option<RenderPass>
pub fn is_depth_test_enabled(&self) -> bool
pub fn render_pass(&mut self, render_pass: Option<RenderPass>)
pub fn depth_test(&mut self, enable: bool)
pub fn texture(&mut self, texture: Option<Texture2D>)
pub fn scissor(&mut self, clip: Option<(i32, i32, i32, i32)>)
pub fn viewport(&mut self, viewport: Option<(i32, i32, i32, i32)>)
pub fn get_viewport(&self) -> (i32, i32, i32, i32)
pub fn push_model_matrix(&mut self, matrix: Mat4)
pub fn pop_model_matrix(&mut self)
pub fn pipeline(&mut self, pipeline: Option<GlPipeline>)
pub fn draw_mode(&mut self, mode: DrawMode)
pub fn geometry(
&mut self,
vertices: &[impl Into<([f32; 3], [f32; 2], [f32; 4])> + Copy],
indices: &[u16]
)
pub fn delete_pipeline(&mut self, pipeline: GlPipeline)
pub fn set_uniform<T>(&mut self, pipeline: GlPipeline, name: &str, uniform: T)
pub fn set_texture(
&mut self,
pipeline: GlPipeline,
name: &str,
texture: Texture2D
)
Auto Trait Implementations
impl RefUnwindSafe for QuadGl
impl Send for QuadGl
impl Sync for QuadGl
impl Unpin for QuadGl
impl UnwindSafe for QuadGl
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more