diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-14 21:47:25 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-14 21:47:25 +1000 |
commit | 529a603128d5e9dc4701322f44961f165e2183e1 (patch) | |
tree | 3e5d65ac503b971412ae35bfc5fb67a438a3c364 /src/ral/ral_common.h | |
parent | 5b001d39d42314085164724d3a417fb8ebd54f98 (diff) |
generate api docs python
Diffstat (limited to 'src/ral/ral_common.h')
-rw-r--r-- | src/ral/ral_common.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ral/ral_common.h b/src/ral/ral_common.h index 1088404..0f7c1b7 100644 --- a/src/ral/ral_common.h +++ b/src/ral/ral_common.h @@ -1,3 +1,6 @@ +/** + * @brief Common functions that don't actually depend on the specific backend +*/ #pragma once #include "defines.h" #include "buf.h" @@ -5,7 +8,6 @@ #include "ral_types.h" #include "ral_impl.h" - TYPED_POOL(GPU_Buffer, Buffer); TYPED_POOL(GPU_Texture, Texture); TYPED_POOL(GPU_PipelineLayout, PipelineLayout); @@ -17,23 +19,23 @@ TYPED_POOL(GPU_Renderpass, Renderpass); #define TEXTURE_GET(h) (texture_pool_get(&context.resource_pools->textures, h)) // --- Pools -typedef struct GPU_BackendPools{ +typedef struct GPU_BackendPools { Pipeline_pool pipelines; PipelineLayout_pool pipeline_layouts; Renderpass_pool renderpasses; } GPU_BackendPools; -void backend_pools_init(arena* a, GPU_BackendPools* backend_pools); +void BackendPools_Init(arena* a, GPU_BackendPools* backend_pools); struct ResourcePools { Buffer_pool buffers; Texture_pool textures; }; -void resource_pools_init(arena* a, struct ResourcePools* res_pools); - +typedef struct ResourcePools ResourcePools; +void ResourcePools_Init(arena* a, struct ResourcePools* res_pools); // --- Vertex formats -bytebuffer vertices_as_bytebuffer(arena* a, VertexFormat format, Vertex_darray* vertices); - -void vertex_desc_add(VertexDescription* builder, const char* name, VertexAttribType type); VertexDescription static_3d_vertex_description(); -size_t vertex_attrib_size(VertexAttribType attr); + +void VertexDesc_AddAttr(VertexDescription* builder, const char* name, VertexAttribType type); + +size_t VertexAttribSize(VertexAttribType attr); |