mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 22:04:24 +00:00
Initial pipeline abstraction
This commit is contained in:
16
Source/Render/Pipeline/VertexState.rs
Normal file
16
Source/Render/Pipeline/VertexState.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use crate::Render::VertexBufferLayout;
|
||||
use crate::Shader::Shader;
|
||||
use std::borrow::Cow;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct VertexState {
|
||||
/// The compiled shader module for this stage.
|
||||
pub shader: Cow<'static, Shader>,
|
||||
|
||||
/// The name of the entry point in the compiled shader. There must be a function that returns
|
||||
/// void with this name in the shader.
|
||||
pub entry_point: &'static str,
|
||||
|
||||
/// The format of any vertex buffers used with this pipeline.
|
||||
pub buffers: Cow<'static, [VertexBufferLayout]>,
|
||||
}
|
Reference in New Issue
Block a user