pub enum GLSLVersion {
V120,
V330,
V450,
V460,
}Expand description
Supported GLSL version targets.
Variants§
V120
GLSL 1.20 — OpenGL 2.1 (legacy)
V330
GLSL 3.30 — OpenGL 3.3 (core profile, widespread)
V450
GLSL 4.50 — OpenGL 4.5 (DSA, direct state access era)
V460
GLSL 4.60 — OpenGL 4.6 / SPIR-V interop
Implementations§
Source§impl GLSLVersion
impl GLSLVersion
Sourcepub fn profile(self) -> &'static str
pub fn profile(self) -> &'static str
Return the profile string appended after the version number.
GLSL 1.20 predates the core/compatibility split; later versions
default to core.
Sourcepub fn version_line(self) -> String
pub fn version_line(self) -> String
Emit the full #version line.
Sourcepub fn supports_layout_location(self) -> bool
pub fn supports_layout_location(self) -> bool
Whether this version supports explicit layout(location = …) qualifiers.
Sourcepub fn supports_compute(self) -> bool
pub fn supports_compute(self) -> bool
Whether this version supports compute shaders.
Sourcepub fn supports_uint(self) -> bool
pub fn supports_uint(self) -> bool
Whether this version supports uint / uvec* types.
Trait Implementations§
Source§impl Clone for GLSLVersion
impl Clone for GLSLVersion
Source§fn clone(&self) -> GLSLVersion
fn clone(&self) -> GLSLVersion
Returns a duplicate 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 GLSLVersion
impl Debug for GLSLVersion
Source§impl Display for GLSLVersion
impl Display for GLSLVersion
Source§impl Hash for GLSLVersion
impl Hash for GLSLVersion
Source§impl PartialEq for GLSLVersion
impl PartialEq for GLSLVersion
impl Copy for GLSLVersion
impl Eq for GLSLVersion
impl StructuralPartialEq for GLSLVersion
Auto Trait Implementations§
impl Freeze for GLSLVersion
impl RefUnwindSafe for GLSLVersion
impl Send for GLSLVersion
impl Sync for GLSLVersion
impl Unpin for GLSLVersion
impl UnsafeUnpin for GLSLVersion
impl UnwindSafe for GLSLVersion
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