diff options
author | Omniscient <omniscient.oce@gmail.com> | 2024-06-09 11:42:17 +1000 |
---|---|---|
committer | Omniscient <omniscient.oce@gmail.com> | 2024-06-09 11:42:17 +1000 |
commit | 64830ce51a185091f54c2b42b365110d89d44f1b (patch) | |
tree | 644c4a4425c2003a649cf02af33af488cb56a148 /src/renderer/backends/opengl/backend_opengl.h | |
parent | 859ea7e23d2bbbc4b32b43727ae50aebe399e720 (diff) |
triangle on opengl works again. happy days
Diffstat (limited to 'src/renderer/backends/opengl/backend_opengl.h')
-rw-r--r-- | src/renderer/backends/opengl/backend_opengl.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/renderer/backends/opengl/backend_opengl.h b/src/renderer/backends/opengl/backend_opengl.h index a9835c1..91de38d 100644 --- a/src/renderer/backends/opengl/backend_opengl.h +++ b/src/renderer/backends/opengl/backend_opengl.h @@ -4,6 +4,9 @@ #include "defines.h" #include "maths_types.h" +#include "ral_types.h" + +#define MAX_PIPELINE_UNIFORM_BUFFERS 32 typedef struct gpu_swapchain { u32x2 dimensions; @@ -15,13 +18,14 @@ typedef struct gpu_pipeline_layout { } gpu_pipeline_layout; typedef struct gpu_pipeline { u32 shader_id; - u32 vao; + vertex_description vertex_desc; + buffer_handle uniform_bindings[MAX_PIPELINE_UNIFORM_BUFFERS]; } gpu_pipeline; typedef struct gpu_renderpass { void *pad } gpu_renderpass; typedef struct gpu_cmd_encoder { - void *pad + gpu_pipeline *pipeline; } gpu_cmd_encoder; // Recording typedef struct gpu_cmd_buffer { void *pad @@ -31,6 +35,7 @@ typedef struct gpu_buffer { union { u32 vbo; u32 ibo; + u32 ubo; } id; u32 vao; // Optional u64 size; |