[−][src]Struct azul_core::gl::GlShader
Fields
program_id: GLuint
gl_context: Rc<dyn Gl>
Implementations
impl GlShader
[src]
pub fn new(
gl_context: Rc<dyn Gl>,
vertex_shader: &str,
fragment_shader: &str
) -> Result<Self, GlShaderCreateError>
[src]
gl_context: Rc<dyn Gl>,
vertex_shader: &str,
fragment_shader: &str
) -> Result<Self, GlShaderCreateError>
Compiles and creates a new OpenGL shader, created from a vertex and a fragment shader string.
If the shader fails to compile, the shader object gets automatically deleted, no cleanup necessary.
pub fn draw<T: VertexLayoutDescription>(
&mut self,
buffers: &[(Rc<VertexBuffer<T>>, Vec<Uniform>)],
clear_color: Option<ColorU>,
texture_size: LogicalSize
) -> Texture
[src]
&mut self,
buffers: &[(Rc<VertexBuffer<T>>, Vec<Uniform>)],
clear_color: Option<ColorU>,
texture_size: LogicalSize
) -> Texture
Draws vertex buffers, index buffers + uniforms to the currently bound framebuffer
NOTE: FrameBuffer::bind()
and VertexBuffer::bind()
have to be called first!
Trait Implementations
impl Debug for GlShader
[src]
impl Display for GlShader
[src]
impl Drop for GlShader
[src]
impl Eq for GlShader
[src]
impl Hash for GlShader
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for GlShader
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<GlShader> for GlShader
[src]
impl PartialOrd<GlShader> for GlShader
[src]
Auto Trait Implementations
impl !RefUnwindSafe for GlShader
impl !Send for GlShader
impl !Sync for GlShader
impl Unpin for GlShader
impl !UnwindSafe for GlShader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,