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§
Required Methods§
Sourcefn attributes(&self) -> &[(Self::GlAttrId, VertexAttr)]
fn attributes(&self) -> &[(Self::GlAttrId, VertexAttr)]
Borrow a slice of attribute / program attribute location pairings
Sourcefn uniform(&self, uniform_id: UniformId) -> Option<Self::GlUniformId<'_>>
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
Sourcefn texture_uniform(
&self,
texture_id: TextureId,
) -> Option<(Self::GlUniformId<'_>, u32)>
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.