pub enum ShaderVersion {
Gl120,
Gl140,
Es100,
Es300,
}
Expand description
Helper for parsing and interpreting the OpenGL shader version.
Variants§
Implementations§
Source§impl ShaderVersion
impl ShaderVersion
pub fn get(gl: &Context) -> Self
Sourcepub fn version_declaration(&self) -> &'static str
pub fn version_declaration(&self) -> &'static str
Goes on top of the shader.
Sourcepub fn is_new_shader_interface(&self) -> bool
pub fn is_new_shader_interface(&self) -> bool
If true, use in/out
. If false
, use varying
and gl_FragColor
.
pub fn is_embedded(&self) -> bool
Trait Implementations§
Source§impl Clone for ShaderVersion
impl Clone for ShaderVersion
Source§fn clone(&self) -> ShaderVersion
fn clone(&self) -> ShaderVersion
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ShaderVersion
impl Debug for ShaderVersion
Source§impl PartialEq for ShaderVersion
impl PartialEq for ShaderVersion
impl Copy for ShaderVersion
impl Eq for ShaderVersion
impl StructuralPartialEq for ShaderVersion
Auto Trait Implementations§
impl Freeze for ShaderVersion
impl RefUnwindSafe for ShaderVersion
impl Send for ShaderVersion
impl Sync for ShaderVersion
impl Unpin for ShaderVersion
impl UnwindSafe for ShaderVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more