Struct ren::ShaderStage
source · pub struct ShaderStage<'gl> { /* private fields */ }
Implementations§
source§impl ShaderStage<'static>
impl ShaderStage<'static>
sourcepub unsafe fn new_unsafe(
kind: ShaderStageKind,
source: impl AsRef<str>
) -> Result<Self, ShaderStageError>
pub unsafe fn new_unsafe( kind: ShaderStageKind, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
Safety
Must only be called on a thread where there is a current
OpenGL context. The returned ShaderStage
must only
exist, while the OpenGL context is valid.
source§impl<'gl> ShaderStage<'gl>
impl<'gl> ShaderStage<'gl>
pub fn new( _ctx: &mut RenderingContext<'gl>, kind: ShaderStageKind, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
pub fn new_vertex( _ctx: &mut RenderingContext<'gl>, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
pub fn new_fragment( _ctx: &mut RenderingContext<'gl>, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
pub fn new_geometry( _ctx: &mut RenderingContext<'gl>, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
pub fn new_compute( _ctx: &mut RenderingContext<'gl>, source: impl AsRef<str> ) -> Result<Self, ShaderStageError>
Trait Implementations§
source§impl<'gl> AsRef<ShaderStage<'gl>> for ShaderStage<'gl>
impl<'gl> AsRef<ShaderStage<'gl>> for ShaderStage<'gl>
source§fn as_ref(&self) -> &ShaderStage<'gl>
fn as_ref(&self) -> &ShaderStage<'gl>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Debug for ShaderStage<'_>
impl Debug for ShaderStage<'_>
source§impl Drop for ShaderStage<'_>
impl Drop for ShaderStage<'_>
Auto Trait Implementations§
impl<'gl> RefUnwindSafe for ShaderStage<'gl>
impl<'gl> Send for ShaderStage<'gl>
impl<'gl> Sync for ShaderStage<'gl>
impl<'gl> Unpin for ShaderStage<'gl>
impl<'gl> UnwindSafe for ShaderStage<'gl>
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