Add document nodes for gpu pipeline nodes (#1292)

* Add document nodes for gpu pipeline nodes

* Load existing frame instead of clearing it

* Feature gate gpu imports
This commit is contained in:
Dennis Kobert 2023-06-08 10:13:19 +02:00 committed by Keavon Chambers
parent 45b04f4eb9
commit 5b6db0a762
7 changed files with 493 additions and 12 deletions

View file

@ -32,6 +32,8 @@ impl<'a, T: ApplicationIo<Executor = WgpuExecutor>> From<EditorApi<'a, T>> for &
}
}
pub type WgpuSurface = Arc<SurfaceHandle<wgpu::Surface>>;
#[repr(C)]
#[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)]
struct Vertex {
@ -292,7 +294,7 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
view: &view,
resolve_target: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Clear(wgpu::Color::GREEN),
load: wgpu::LoadOp::Load,
store: true,
},
})],