kitgit

tirbofish/dropbear · diff

0e5688b · Thribhu K

wip: component should support kotlin wip: debug drawing for camera splines

Unverified

diff --git a/crates/dropbear-engine/src/debug.rs b/crates/dropbear-engine/src/debug.rs
new file mode 100644
index 0000000..e38f424
--- /dev/null
+++ b/crates/dropbear-engine/src/debug.rs
@@ -0,0 +1,59 @@
+use std::sync::Arc;
+use wgpu::{RenderPipeline, RenderPipelineDescriptor, VertexState};
+use crate::graphics::SharedGraphicsContext;
+
+pub struct DebugLine {
+
+}
+
+pub struct DebugDraw {
+    pipeline: Arc<DebugDrawPipeline>,
+}
+
+impl DebugDraw {
+    pub fn draw_line(&self) {
+
+    }
+}
+
+pub struct DebugDrawPipeline {
+    pipeline: RenderPipeline,
+}
+
+impl DebugDrawPipeline {
+    pub fn new(graphics: Arc<SharedGraphicsContext>) -> Self {
+        let pipeline_layout = graphics.device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
+            label: Some("debug draw pipeline layout"),
+            bind_group_layouts: &[],
+            push_constant_ranges: &[],
+        });
+
+        let pipeline = graphics.device.create_render_pipeline(&RenderPipelineDescriptor {
+            label: Some("debug draw render pipeline"),
+            layout: Some(&pipeline_layout),
+            vertex: VertexState {
+                module: &(),
+                entry_point: None,
+                compilation_options: Default::default(),
+                buffers: &[],
+            },
+            primitive: Default::default(),
+            depth_stencil: None,
+            multisample: Default::default(),
+            fragment: None,
+            multiview: None,

Large diffs are not rendered by default. Showing the first 50 of 631 lines. Show full diff