Struct glium::program::SpirvProgram
source · pub struct SpirvProgram<'a> {
pub vertex_shader: SpirvEntryPoint<'a>,
pub fragment_shader: SpirvEntryPoint<'a>,
pub tessellation_control_shader: Option<SpirvEntryPoint<'a>>,
pub tessellation_evaluation_shader: Option<SpirvEntryPoint<'a>>,
pub geometry_shader: Option<SpirvEntryPoint<'a>>,
pub transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>,
pub outputs_srgb: bool,
pub uses_point_size: bool,
}
Expand description
Represents a SPIR-V program. The shaders can refer to entry points in the same binary.
Fields§
§vertex_shader: SpirvEntryPoint<'a>
The vertex shader.
fragment_shader: SpirvEntryPoint<'a>
The fragment shader.
tessellation_control_shader: Option<SpirvEntryPoint<'a>>
Optional tessellation control shader.
tessellation_evaluation_shader: Option<SpirvEntryPoint<'a>>
Optional tessellation evaluation shader.
geometry_shader: Option<SpirvEntryPoint<'a>>
Optional geometry shader.
transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>
The list of variables and mode to use for transform feedback.
The information specified here will be passed to the OpenGL linker. If you pass
None
, then you won’t be able to use transform feedback.
outputs_srgb: bool
See SourceCode::outputs_srgb
.
uses_point_size: bool
Whether the shader uses point size.
Implementations§
source§impl<'a> SpirvProgram<'a>
impl<'a> SpirvProgram<'a>
sourcepub fn from_vs_and_fs(
vertex_shader: SpirvEntryPoint<'a>,
fragment_shader: SpirvEntryPoint<'a>
) -> Self
pub fn from_vs_and_fs( vertex_shader: SpirvEntryPoint<'a>, fragment_shader: SpirvEntryPoint<'a> ) -> Self
Create new SpirvProgram
from vertex and fragment shaders.
sourcepub fn tessellation_control_shader(
self,
tessellation_control_shader: Option<SpirvEntryPoint<'a>>
) -> Self
pub fn tessellation_control_shader( self, tessellation_control_shader: Option<SpirvEntryPoint<'a>> ) -> Self
Builder method to set tessellation_control_shader
.
sourcepub fn tessellation_evaluation_shader(
self,
tessellation_evaluation_shader: Option<SpirvEntryPoint<'a>>
) -> Self
pub fn tessellation_evaluation_shader( self, tessellation_evaluation_shader: Option<SpirvEntryPoint<'a>> ) -> Self
Builder method to set tessellation_evaluation_shader
.
sourcepub fn geometry_shader(
self,
geometry_shader: Option<SpirvEntryPoint<'a>>
) -> Self
pub fn geometry_shader( self, geometry_shader: Option<SpirvEntryPoint<'a>> ) -> Self
Builder method to set geometry_shader
.
sourcepub fn transform_feedback_varyings(
self,
transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>
) -> Self
pub fn transform_feedback_varyings( self, transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)> ) -> Self
Builder method to set transform_feedback_varyings
.
sourcepub fn outputs_srgb(self, outputs_srgb: bool) -> Self
pub fn outputs_srgb(self, outputs_srgb: bool) -> Self
Builder method to set outputs_srgb
.
sourcepub fn uses_point_size(self, uses_point_size: bool) -> Self
pub fn uses_point_size(self, uses_point_size: bool) -> Self
Builder method to set uses_point_size
.
Trait Implementations§
source§impl<'a> Clone for SpirvProgram<'a>
impl<'a> Clone for SpirvProgram<'a>
source§fn clone(&self) -> SpirvProgram<'a>
fn clone(&self) -> SpirvProgram<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more