pub struct WebGLRSShader<'ctx> { /* private fields */ }
Expand description
The WebGLRSShader
is part of the WebGL API and can either be a vertex or a fragment shader.
A WebGLRSProgram
requires both types of shaders.
Implementations§
Source§impl<'ctx> WebGLRSShader<'ctx>
impl<'ctx> WebGLRSShader<'ctx>
Sourcepub fn compile(&self)
pub fn compile(&self)
Compiles a GLSL shader into binary data so that it can be used by a WebGLRSProgram
.
Sourcepub fn info_log(&self) -> String
pub fn info_log(&self) -> String
Returns the information log for the specified WebGLRSShader
object. It contains warnings, debugging
and compile information.
Sourcepub fn shader_source(&self) -> String
pub fn shader_source(&self) -> String
Returns the source code of this WebGLRSShader
as a String
.
Sourcepub fn set_shader_source(&self, source: &str)
pub fn set_shader_source(&self, source: &str)
Sets the source code of the WebGLRSShader
object.
Sourcepub fn delete_status(&self) -> bool
pub fn delete_status(&self) -> bool
Returns a bool indicating whether or not the WebGLRSShader
is flagged for deletion.
Sourcepub fn compile_status(&self) -> bool
pub fn compile_status(&self) -> bool
Returns a bool indicating whether or not the last compilation was successful.
Sourcepub fn kind(&self) -> ShaderKind
pub fn kind(&self) -> ShaderKind
Returns a ShaderKind
value indicating whether the shader is a vertex shader or fragment shader.
Trait Implementations§
Source§impl<'ctx> Clone for WebGLRSShader<'ctx>
impl<'ctx> Clone for WebGLRSShader<'ctx>
Source§fn clone(&self) -> WebGLRSShader<'ctx>
fn clone(&self) -> WebGLRSShader<'ctx>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'ctx> Freeze for WebGLRSShader<'ctx>
impl<'ctx> RefUnwindSafe for WebGLRSShader<'ctx>
impl<'ctx> !Send for WebGLRSShader<'ctx>
impl<'ctx> !Sync for WebGLRSShader<'ctx>
impl<'ctx> Unpin for WebGLRSShader<'ctx>
impl<'ctx> UnwindSafe for WebGLRSShader<'ctx>
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