Struct nannou::ui::backend::glium::glium::program::ComputeShader [−][src]
pub struct ComputeShader { /* fields omitted */ }
A combination of compute shaders linked together.
Methods
impl ComputeShader
[src]
impl ComputeShader
pub fn is_supported<C>(ctxt: &C) -> bool where
C: CapabilitiesSource + ?Sized,
[src]
pub fn is_supported<C>(ctxt: &C) -> bool where
C: CapabilitiesSource + ?Sized,
Returns true if the backend supports compute shaders.
pub fn from_source<F>(
facade: &F,
src: &str
) -> Result<ComputeShader, ProgramCreationError> where
F: Facade + ?Sized,
[src]
pub fn from_source<F>(
facade: &F,
src: &str
) -> Result<ComputeShader, ProgramCreationError> where
F: Facade + ?Sized,
Builds a new compute shader from some source code.
pub fn from_binary<F>(
facade: &F,
data: Binary
) -> Result<ComputeShader, ProgramCreationError> where
F: Facade + ?Sized,
[src]
pub fn from_binary<F>(
facade: &F,
data: Binary
) -> Result<ComputeShader, ProgramCreationError> where
F: Facade + ?Sized,
Builds a new compute shader from some binary.
pub fn execute<U>(&self, uniforms: U, x: u32, y: u32, z: u32) where
U: Uniforms,
[src]
pub fn execute<U>(&self, uniforms: U, x: u32, y: u32, z: u32) where
U: Uniforms,
Executes the compute shader.
x * y * z
work groups will be started. The current work group can be retrieved with
gl_WorkGroupID
. Inside each work group, additional local work groups can be started
depending on the attributes of the compute shader itself.
pub fn execute_indirect<U>(
&self,
uniforms: U,
buffer: BufferSlice<ComputeCommand>
) where
U: Uniforms,
[src]
pub fn execute_indirect<U>(
&self,
uniforms: U,
buffer: BufferSlice<ComputeCommand>
) where
U: Uniforms,
Executes the compute shader.
This is similar to execute
, except that the parameters are stored in a buffer.
pub fn get_binary(&self) -> Result<Binary, GetBinaryError>
[src]
pub fn get_binary(&self) -> Result<Binary, GetBinaryError>
Returns the program's compiled binary.
You can store the result in a file, then reload it later. This avoids having to compile the source code every time.
pub fn get_uniform(&self, name: &str) -> Option<&Uniform>
[src]
pub fn get_uniform(&self, name: &str) -> Option<&Uniform>
Returns informations about a uniform variable, if it exists.
ⓘImportant traits for Iter<'a, K, V>pub fn uniforms(&self) -> Iter<String, Uniform>
[src]
pub fn uniforms(&self) -> Iter<String, Uniform>
Returns an iterator to the list of uniforms.
Example
for (name, uniform) in program.uniforms() { println!("Name: {} - Type: {:?}", name, uniform.ty); }
pub fn get_uniform_blocks(
&self
) -> &HashMap<String, UniformBlock, BuildHasherDefault<FnvHasher>>
[src]
pub fn get_uniform_blocks(
&self
) -> &HashMap<String, UniformBlock, BuildHasherDefault<FnvHasher>>
Returns a list of uniform blocks.
Example
for (name, uniform) in program.get_uniform_blocks() { println!("Name: {}", name); }
pub fn get_shader_storage_blocks(
&self
) -> &HashMap<String, UniformBlock, BuildHasherDefault<FnvHasher>>
[src]
pub fn get_shader_storage_blocks(
&self
) -> &HashMap<String, UniformBlock, BuildHasherDefault<FnvHasher>>
Returns the list of shader storage blocks.
Example
for (name, uniform) in program.get_shader_storage_blocks() { println!("Name: {}", name); }
Trait Implementations
impl Debug for ComputeShader
[src]
impl Debug for ComputeShader
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl GlObject for ComputeShader
[src]
impl GlObject for ComputeShader
Auto Trait Implementations
impl !Send for ComputeShader
impl !Send for ComputeShader
impl !Sync for ComputeShader
impl !Sync for ComputeShader