summaryrefslogtreecommitdiff
path: root/src/new_render/immdraw.c
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-31 12:38:12 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-31 12:38:12 +1000
commit8550c5d41ee84bcbf5e355c5adb6659166e3eb62 (patch)
treefd944fbb3a0f4a7c71a7d1d23e4289950e346f17 /src/new_render/immdraw.c
parentfa04ebc603a7bf742c64724ede23cfa010fb3c4c (diff)
start on immediate drawing
Diffstat (limited to 'src/new_render/immdraw.c')
-rw-r--r--src/new_render/immdraw.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/new_render/immdraw.c b/src/new_render/immdraw.c
new file mode 100644
index 0000000..3d7cf7d
--- /dev/null
+++ b/src/new_render/immdraw.c
@@ -0,0 +1,27 @@
+#include "immdraw.h"
+#include "log.h"
+#include "primitives.h"
+#include "ral_common.h"
+#include "ral_impl.h"
+#include "ral_types.h"
+#include "render.h"
+#include "shader_layouts.h"
+
+void Immdraw_Init(Immdraw_Storage* storage) {
+ INFO("Immediate drawing initialisation");
+ // meshes
+ Geometry sphere_geo = Geo_CreateUVsphere(1.0, 8, 8);
+ storage->sphere = Mesh_Create(&sphere_geo, false);
+
+ // pipeline / material
+ ShaderData camera_data = { .get_layout = &Binding_Camera_GetLayout };
+ GraphicsPipelineDesc pipeline_desc = {
+ .debug_name = "Immediate Draw Pipeline",
+ .data_layouts = { camera_data },
+ .data_layouts_count = 1,
+
+ };
+ storage->colour_pipeline = GPU_GraphicsPipeline_Create(pipeline_desc, GPU_GetDefaultRenderpass());
+}
+
+void Immdraw_Sphere(Transform tf, f32 size, Vec4 colour, bool wireframe) {} \ No newline at end of file