[][src]Struct rustbatch::render::shader::Shader

pub struct Shader { /* fields omitted */ }

Shader is wrapper for opengl shader it holds only pointer of the shader so you can freely clone ti

Implementations

impl Shader[src]

pub fn new<P: AsRef<Path>>(path: P) -> Result<Shader, String>[src]

new loads and compiles shader from given path

pub fn default_vertex() -> Shader[src]

default_vertex returns default vertex shader

pub fn default_fragment() -> Shader[src]

default_fragment returns default fragment shader

pub fn no_texture_fragment() -> Shader[src]

pub fn no_texture_vertex() -> Shader[src]

pub fn from_source(source: &CStr, kind: GLenum) -> Result<Shader, String>[src]

from_source compiles shader from provided cstring

pub fn id(&self) -> GLuint[src]

id returns id of shader, likewise program this is pointer to opengl object

Trait Implementations

impl Drop for Shader[src]

Auto Trait Implementations

impl RefUnwindSafe for Shader

impl Send for Shader

impl Sync for Shader

impl Unpin for Shader

impl UnwindSafe for Shader

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,