summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/shadow_maps/ex_shadow_maps.c4
-rw-r--r--src/renderer/backends/opengl/backend_opengl.c4
-rw-r--r--src/renderer/backends/opengl/backend_opengl.h7
-rw-r--r--src/renderer/renderpasses.c8
4 files changed, 12 insertions, 11 deletions
diff --git a/examples/shadow_maps/ex_shadow_maps.c b/examples/shadow_maps/ex_shadow_maps.c
index 1d40128..e4f7f8a 100644
--- a/examples/shadow_maps/ex_shadow_maps.c
+++ b/examples/shadow_maps/ex_shadow_maps.c
@@ -26,7 +26,7 @@ int main() {
camera cam = camera_create(camera_pos, camera_front, VEC3_Y, deg_to_rad(45.0));
ren_shadowmaps shadows = { .width = 1000, .height = 1000 };
- ren_shadowmaps_init(&shadows);
+ // ren_shadowmaps_init(&shadows);
// Meshes
mesh cubes[4];
@@ -54,7 +54,7 @@ int main() {
gpu_cmd_encoder_end_render(enc);
- gpu_cmd_encoder_begin_render(enc, static_opaque_rpass);
+ // gpu_cmd_encoder_begin_render(enc, static_opaque_rpass);
gpu_cmd_encoder_end_render(enc);
/*
diff --git a/src/renderer/backends/opengl/backend_opengl.c b/src/renderer/backends/opengl/backend_opengl.c
index 7d632c7..8f52674 100644
--- a/src/renderer/backends/opengl/backend_opengl.c
+++ b/src/renderer/backends/opengl/backend_opengl.c
@@ -172,13 +172,13 @@ gpu_cmd_encoder gpu_cmd_encoder_create() {
void gpu_cmd_encoder_destroy(gpu_cmd_encoder* encoder) {}
void gpu_cmd_encoder_begin(gpu_cmd_encoder encoder) {}
void gpu_cmd_encoder_begin_render(gpu_cmd_encoder* encoder, gpu_renderpass* renderpass) {
- glBindFramebuffer(GL_FRAMEBUFFER, renderpass->fbo);
+ // glBindFramebuffer(GL_FRAMEBUFFER, renderpass->fbo);
rgba clear_colour = STONE_800;
glClearColor(clear_colour.r, clear_colour.g, clear_colour.b, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void gpu_cmd_encoder_end_render(gpu_cmd_encoder* encoder) {
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ // glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
void gpu_cmd_encoder_begin_compute() {}
gpu_cmd_encoder* gpu_get_default_cmd_encoder() { return &context.command_buffer; }
diff --git a/src/renderer/backends/opengl/backend_opengl.h b/src/renderer/backends/opengl/backend_opengl.h
index f588643..9cfbb06 100644
--- a/src/renderer/backends/opengl/backend_opengl.h
+++ b/src/renderer/backends/opengl/backend_opengl.h
@@ -4,6 +4,7 @@
#include "defines.h"
#include "maths_types.h"
+#include "ral.h"
#include "ral_types.h"
#define MAX_PIPELINE_UNIFORM_BUFFERS 32
@@ -27,13 +28,13 @@ typedef struct gpu_pipeline {
typedef struct gpu_renderpass {
u32 fbo;
gpu_renderpass_desc description;
- void *pad
+ void *pad;
} gpu_renderpass;
typedef struct gpu_cmd_encoder {
gpu_pipeline *pipeline;
} gpu_cmd_encoder; // Recording
typedef struct gpu_cmd_buffer {
- void *pad
+ void *pad;
} gpu_cmd_buffer; // Ready for submission
typedef struct gpu_buffer {
@@ -50,7 +51,7 @@ typedef struct gpu_buffer {
} gpu_buffer;
typedef struct gpu_texture {
u32 id;
- void *pad
+ void* pad;
} gpu_texture;
typedef struct opengl_support {
diff --git a/src/renderer/renderpasses.c b/src/renderer/renderpasses.c
index 85b86ed..d28df3d 100644
--- a/src/renderer/renderpasses.c
+++ b/src/renderer/renderpasses.c
@@ -38,10 +38,10 @@ gpu_renderpass* shadowmaps_renderpass_create() {
}
gpu_pipeline* shadowmaps_pipeline_create() {
- struct graphics_pipeline_desc desc = {
- .
- };
- gpu_graphics_pipeline_create(struct graphics_pipeline_desc description)
+ // struct graphics_pipeline_desc desc = {
+ // .
+ // };
+ // gpu_graphics_pipeline_create(struct graphics_pipeline_desc description)
}
void renderpass_shadowmap_execute(gpu_renderpass* pass, render_entity* entities, size_t entity_count) {