summaryrefslogtreecommitdiff
path: root/src/ral
diff options
context:
space:
mode:
Diffstat (limited to 'src/ral')
-rw-r--r--src/ral/ral_types.h118
1 files changed, 0 insertions, 118 deletions
diff --git a/src/ral/ral_types.h b/src/ral/ral_types.h
index 1f98e88..fde3bed 100644
--- a/src/ral/ral_types.h
+++ b/src/ral/ral_types.h
@@ -45,15 +45,6 @@ typedef enum GPU_BufferFlag {
} GPU_BufferFlag;
typedef u32 GPU_BufferFlags;
-// --- Textures
-typedef enum GPU_TextureType {
- TEXTURE_TYPE_2D,
- TEXTURE_TYPE_3D,
- TEXTURE_TYPE_2D_ARRAY,
- TEXTURE_TYPE_CUBE_MAP,
- TEXTURE_TYPE_COUNT
-} GPU_TextureType;
-
static const char* texture_type_names[] = {
"RAL Texture 2D", "RAL Texture 3D", "RAL Texture 2D Array",
"RAL Texture Cubemap", "RAL Texture Count",
@@ -66,14 +57,6 @@ typedef enum GPU_TextureFormat {
TEXTURE_FORMAT_COUNT
} GPU_TextureFormat;
-/** @brief Texture Description - used by texture creation functions */
-typedef struct TextureDesc {
- GPU_TextureType tex_type;
- GPU_TextureFormat format;
- u32x2 extents;
- u32 num_channels;
-} TextureDesc;
-
// --- Vertices
typedef enum VertexFormat {
@@ -86,45 +69,6 @@ typedef enum VertexFormat {
VERTEX_COUNT
} VertexFormat;
-typedef union Vertex {
- struct {
- Vec3 position;
- Vec3 normal;
- Vec2 tex_coords;
- } static_3d; /** @brief standard vertex format for static geometry in 3D */
-
- struct {
- Vec2 position;
- Vec4 colour;
- Vec2 tex_coords;
- } sprite; /** @brief vertex format for 2D sprites or quads */
-
- struct {
- Vec3 position;
- Vec4 colour;
- Vec2 tex_coords;
- 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 */
-
- struct {
- Vec3 position;
- Vec2 tex_coords;
- Vec3 normal;
- Vec4 colour;
- } coloured_static_3d; /** @brief vertex format used for debugging */
-
- struct {
- Vec2 position;
- Vec3 colour;
- } raw_pos_colour;
-
- struct {
- Vec3 position;
- } pos_only;
-} Vertex;
-
#ifndef TYPED_VERTEX_ARRAY
KITC_DECL_TYPED_ARRAY(Vertex);
KITC_DECL_TYPED_ARRAY(u32)
@@ -162,12 +106,6 @@ typedef enum PipelineKind {
PIPELINE_COMPUTE,
} PipelineKind;
-typedef enum ShaderVisibility {
- VISIBILITY_VERTEX = 1 << 0,
- VISIBILITY_FRAGMENT = 1 << 1,
- VISIBILITY_COMPUTE = 1 << 2,
-} ShaderVisibility;
-
typedef struct ShaderDesc {
const char* debug_name;
Str8 filepath; // Where it came from
@@ -176,39 +114,6 @@ typedef struct ShaderDesc {
bool is_combined_vert_frag; // Contains both vertex and fragment stages
} ShaderDesc;
-typedef enum ShaderBindingKind {
- BINDING_BYTES,
- BINDING_BUFFER,
- BINDING_BUFFER_ARRAY,
- BINDING_TEXTURE,
- BINDING_TEXTURE_ARRAY,
- BINDING_SAMPLER,
- BINDING_COUNT
-} ShaderBindingKind;
-
-typedef struct ShaderBinding {
- const char* label;
- ShaderBindingKind kind;
- ShaderVisibility vis;
- union {
- struct {
- u32 size;
- void* data;
- } bytes;
- struct {
- BufferHandle handle;
- } buffer;
- struct {
- TextureHandle handle;
- } texture;
- } data;
-} ShaderBinding;
-
-typedef struct ShaderDataLayout {
- ShaderBinding bindings[MAX_SHADER_BINDINGS];
- size_t binding_count;
-} ShaderDataLayout;
-
typedef ShaderDataLayout (*FN_GetBindingLayout)(void* data);
/** @brief takes a `ShaderDataLayout` without data, and puts the correct data into each binding */
@@ -219,10 +124,6 @@ typedef void (*FN_BindShaderData)(ShaderDataLayout* layout, const void* data);
// void* data;
// } ShaderData;
-// --- Miscellaneous
-
-#define TOPOLOGY_SHORT_NAMES
-
typedef enum PrimitiveTopology {
#ifdef TOPOLOGY_SHORT_NAMES
CEL_POINT,
@@ -241,8 +142,6 @@ typedef enum PrimitiveTopology {
#endif
} PrimitiveTopology;
-typedef enum CullMode { CULL_BACK_FACE, CULL_FRONT_FACE, CULL_COUNT } CullMode;
-
typedef enum Winding { WINDING_CCW, WINDING_CW } Winding;
// based on https://registry.khronos.org/OpenGL-Refpages/gl4/html/glDepthFunc.xhtml
@@ -258,23 +157,6 @@ typedef enum CompareFunc {
COMPARE_COUNT
} CompareFunc;
-typedef struct GraphicsPipelineDesc {
- const char* debug_name;
- VertexDescription vertex_desc;
- ShaderDesc vs; /** @brief Vertex shader stage */
- ShaderDesc fs; /** @brief Fragment shader stage */
-
- // Roughly equivalent to a descriptor set layout each. each layout can have multiple bindings
- // examples:
- // - uniform buffer representing view projection matrix
- // - texture for shadow map
- ShaderDataLayout data_layouts[MAX_SHADER_DATA_LAYOUTS];
- u32 data_layouts_count;
-
- bool wireframe;
- bool depth_test;
-} GraphicsPipelineDesc;
-
bool GraphicsPipelineDesc_AddShaderDataLayout(GraphicsPipelineDesc* desc, ShaderDataLayout layout);
typedef struct GPU_RenderpassDesc {