Trait GlProgram

Source
pub trait GlProgram: Sized {
    type GlAttrId: Sized;
    type GlUniformId<'a>: Sized + 'a
       where Self: 'a;

    // Required methods
    fn attributes(&self) -> &[(Self::GlAttrId, VertexAttr)];
    fn uniform(&self, uniform_id: UniformId) -> Option<Self::GlUniformId<'_>>;
    fn texture_uniform(
        &self,
        texture_id: TextureId,
    ) -> Option<(Self::GlUniformId<'_>, u32)>;
}

Required Associated Types§

Source

type GlAttrId: Sized

Source

type GlUniformId<'a>: Sized + 'a where Self: 'a

Required Methods§

Source

fn attributes(&self) -> &[(Self::GlAttrId, VertexAttr)]

Borrow a slice of attribute / program attribute location pairings

Source

fn uniform(&self, uniform_id: UniformId) -> Option<Self::GlUniformId<'_>>

Attempt to retrieve a uniform from a UniformId - return None if the shader program does not have that uniform

Source

fn texture_uniform( &self, texture_id: TextureId, ) -> Option<(Self::GlUniformId<'_>, u32)>

Attempt to retrieve the uniform and sampler from a UniformId - return None if the shader program does not have that uniform

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§