Struct alacritty::renderer::shader::ShaderProgram
source · pub struct ShaderProgram(c_uint);
Expand description
A wrapper for a shader program id, with automatic lifetime management.
Tuple Fields§
§0: c_uint
Implementations§
source§impl ShaderProgram
impl ShaderProgram
pub fn new( shader_version: ShaderVersion, shader_header: Option<&str>, vertex_shader: &'static str, fragment_shader: &'static str ) -> Result<Self, ShaderError>
sourcepub fn get_uniform_location(
&self,
name: &'static CStr
) -> Result<c_int, ShaderError>
pub fn get_uniform_location( &self, name: &'static CStr ) -> Result<c_int, ShaderError>
Get uniform location by name. Panic if failed.