mirror of
https://github.com/hannobraun/Fornjot
synced 2025-11-10 00:50:18 +00:00
Add Pipeline::triangles
This commit is contained in:
parent
b8509aed00
commit
8c97e1a2bb
@ -15,10 +15,7 @@ impl Pipelines {
|
||||
uniforms: &wgpu::Buffer,
|
||||
) -> Self {
|
||||
let vertices_pipeline = Pipeline::vertices(device, config, uniforms);
|
||||
|
||||
let triangles_shaders = Shaders::triangles(device, config);
|
||||
let triangles_pipeline =
|
||||
Pipeline::new(device, &triangles_shaders, uniforms);
|
||||
let triangles_pipeline = Pipeline::triangles(device, config, uniforms);
|
||||
|
||||
Self {
|
||||
vertices: vertices_pipeline,
|
||||
@ -42,6 +39,15 @@ impl Pipeline {
|
||||
Pipeline::new(device, &vertices_shaders, uniforms)
|
||||
}
|
||||
|
||||
pub fn triangles(
|
||||
device: &wgpu::Device,
|
||||
config: &wgpu::SurfaceConfiguration,
|
||||
uniforms: &wgpu::Buffer,
|
||||
) -> Self {
|
||||
let triangles_shaders = Shaders::triangles(device, config);
|
||||
Pipeline::new(device, &triangles_shaders, uniforms)
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
device: &wgpu::Device,
|
||||
shaders: &Shaders<impl Vertex>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user