summaryrefslogtreecommitdiff
path: root/src/renderer/cleanroom
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-04-27 16:35:11 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-04-27 16:35:11 +1000
commitfc35df8e999521b8be7c44800f4ff4665df3254a (patch)
tree2acc67b9830e712bef78270c6478c61e184f2047 /src/renderer/cleanroom
parent55bb30899899d1e6f34e85d87909d5108d085adb (diff)
heightmap function signatures
Diffstat (limited to 'src/renderer/cleanroom')
-rw-r--r--src/renderer/cleanroom/backend_vulkan.h7
-rw-r--r--src/renderer/cleanroom/ral.h12
-rw-r--r--src/renderer/cleanroom/renderer.h2
-rw-r--r--src/renderer/cleanroom/types.h13
4 files changed, 20 insertions, 14 deletions
diff --git a/src/renderer/cleanroom/backend_vulkan.h b/src/renderer/cleanroom/backend_vulkan.h
index 6798b13..c8d5777 100644
--- a/src/renderer/cleanroom/backend_vulkan.h
+++ b/src/renderer/cleanroom/backend_vulkan.h
@@ -3,7 +3,8 @@
#define GPU_SWAPCHAIN_IMG_COUNT 2
-typedef struct gpu_swapchain {} gpu_swapchain;
+typedef struct gpu_swapchain {
+} gpu_swapchain;
typedef struct gpu_device {
// In Vulkan we store both physical and logical device here
VkPhysicalDevice physical_device;
@@ -13,7 +14,8 @@ typedef struct gpu_device {
VkPhysicalDeviceMemoryProperties memory;
VkCommandPool pool;
} gpu_device;
-typedef struct gpu_pipeline {} gpu_pipeline;
+typedef struct gpu_pipeline {
+} gpu_pipeline;
typedef struct gpu_renderpass {
VkRenderPass vk_handle;
@@ -21,7 +23,6 @@ typedef struct gpu_renderpass {
u32
} gpu_renderpass;
-
typedef struct gpu_cmd_encoder {
VkCommandBuffer cmd_buffer;
} gpu_cmd_encoder; \ No newline at end of file
diff --git a/src/renderer/cleanroom/ral.h b/src/renderer/cleanroom/ral.h
index a1e9929..15eb027 100644
--- a/src/renderer/cleanroom/ral.h
+++ b/src/renderer/cleanroom/ral.h
@@ -5,9 +5,9 @@
* @details API that a graphics backend *must* implement
* @version 0.1
* @date 2024-03-31
- *
+ *
* @copyright Copyright (c) 2024
- *
+ *
*/
#pragma once
@@ -19,8 +19,8 @@ typedef struct gpu_swapchain gpu_swapchain;
typedef struct gpu_device gpu_device;
typedef struct gpu_pipeline gpu_pipeline;
typedef struct gpu_renderpass gpu_renderpass;
-typedef struct gpu_cmd_encoder gpu_cmd_encoder; // Recording
-typedef struct gpu_cmd_buffer gpu_cmd_buffer; // Ready for submission
+typedef struct gpu_cmd_encoder gpu_cmd_encoder; // Recording
+typedef struct gpu_cmd_buffer gpu_cmd_buffer; // Ready for submission
enum pipeline_kind {
GRAPHICS,
@@ -29,8 +29,8 @@ enum pipeline_kind {
typedef struct shader_desc {
const char* debug_name;
- str8 filepath; // where it came from
- str8 glsl; // contents
+ str8 filepath; // where it came from
+ str8 glsl; // contents
} shader_desc;
struct pipeline_desc {
diff --git a/src/renderer/cleanroom/renderer.h b/src/renderer/cleanroom/renderer.h
index 8012b49..ff342b0 100644
--- a/src/renderer/cleanroom/renderer.h
+++ b/src/renderer/cleanroom/renderer.h
@@ -1,7 +1,7 @@
#pragma once
-#include "cleanroom/ral.h"
#include "cleanroom/backend_vulkan.h"
+#include "cleanroom/ral.h"
typedef struct renderer2 {
void* backend_state;
diff --git a/src/renderer/cleanroom/types.h b/src/renderer/cleanroom/types.h
index 98c2e21..b18b5b8 100644
--- a/src/renderer/cleanroom/types.h
+++ b/src/renderer/cleanroom/types.h
@@ -10,7 +10,8 @@ CORE_DEFINE_HANDLE(sampler_handle);
CORE_DEFINE_HANDLE(shader_handle);
CORE_DEFINE_HANDLE(model_handle);
-typedef struct transform_hierarchy {} transform_hierarchy;
+typedef struct transform_hierarchy {
+} transform_hierarchy;
/** @brief Texture Description - used by texture creation functions */
typedef struct texture_desc {
@@ -56,7 +57,12 @@ typedef struct model bp_material; // blinn-phong
#include "maths_types.h"
-typedef enum vertex_format { VERTEX_STATIC_3D, VERTEX_SPRITE, VERTEX_SKINNED, VERTEX_COUNT } vertex_format;
+typedef enum vertex_format {
+ VERTEX_STATIC_3D,
+ VERTEX_SPRITE,
+ VERTEX_SKINNED,
+ VERTEX_COUNT
+} vertex_format;
typedef union vertex {
struct {
@@ -79,7 +85,7 @@ typedef union vertex {
vec3 normal;
vec4i bone_ids; // Integer vector for bone IDs
vec4 bone_weights; // Weight of each bone's influence
- } skinned_3d; /** @brief vertex format for skeletal (animated) geometry in 3D */
+ } skinned_3d; /** @brief vertex format for skeletal (animated) geometry in 3D */
} vertex;
KITC_DECL_TYPED_ARRAY(vertex)
@@ -128,7 +134,6 @@ typedef struct model {
/* ral.h */
-
// command buffer gubbins
/* --- Backends */