Struct webgl_rs::shader_program::WebGLRSShader
source · 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 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 more