summaryrefslogtreecommitdiff
path: root/gfx/src/render/framebuffer.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-02-25 15:08:26 -0800
committer3gg <3gg@shellblade.net>2024-02-25 15:08:26 -0800
commit5e6328e83bcc2d26d61ca9c084450a0af2bda341 (patch)
tree7ab5556c07589873aeed96db66aed4bf69ea0fe1 /gfx/src/render/framebuffer.c
parentfd3cbac7a9b47936d28cfcf11b7781c563779129 (diff)
Use new error function.
Diffstat (limited to 'gfx/src/render/framebuffer.c')
-rw-r--r--gfx/src/render/framebuffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gfx/src/render/framebuffer.c b/gfx/src/render/framebuffer.c
index 2ea2165..76d9002 100644
--- a/gfx/src/render/framebuffer.c
+++ b/gfx/src/render/framebuffer.c
@@ -52,7 +52,7 @@ static void framebuffer_attach_depth(
52 // TODO: Could distinguish between colour and depth attachment types to make 52 // TODO: Could distinguish between colour and depth attachment types to make
53 // this a compile-time error. 53 // this a compile-time error.
54 case FrameBufferCubemapTexture: 54 case FrameBufferCubemapTexture:
55 set_error("Cannot use a cubemap texture as a depth framebuffer attachment"); 55 log_error("Cannot use a cubemap texture as a depth framebuffer attachment");
56 break; 56 break;
57 case FrameBufferRenderBuffer: 57 case FrameBufferRenderBuffer:
58 glFramebufferRenderbuffer( 58 glFramebufferRenderbuffer(
@@ -71,7 +71,7 @@ bool gfx_init_framebuffer(
71 71
72 glGenFramebuffers(1, &framebuffer->id); 72 glGenFramebuffers(1, &framebuffer->id);
73 if (!framebuffer->id) { 73 if (!framebuffer->id) {
74 set_error("glGenFramebuffers() failed"); 74 log_error("glGenFramebuffers() failed");
75 return false; 75 return false;
76 } 76 }
77 77
@@ -85,7 +85,7 @@ bool gfx_init_framebuffer(
85 framebuffer_attach_colour(framebuffer, &desc->colour); 85 framebuffer_attach_colour(framebuffer, &desc->colour);
86 framebuffer_attach_depth(framebuffer, &desc->depth); 86 framebuffer_attach_depth(framebuffer, &desc->depth);
87 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { 87 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
88 set_error("glCheckFramebufferStatus() failed"); 88 log_error("glCheckFramebufferStatus() failed");
89 gfx_del_framebuffer(framebuffer); 89 gfx_del_framebuffer(framebuffer);
90 return false; 90 return false;
91 } 91 }
@@ -105,7 +105,7 @@ bool gfx_framebuffer_attach_colour(
105 glBindFramebuffer(GL_FRAMEBUFFER, framebuffer->id); 105 glBindFramebuffer(GL_FRAMEBUFFER, framebuffer->id);
106 framebuffer_attach_colour(framebuffer, attachment); 106 framebuffer_attach_colour(framebuffer, attachment);
107 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { 107 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
108 set_error("glCheckFramebufferStatus() failed"); 108 log_error("glCheckFramebufferStatus() failed");
109 return false; 109 return false;
110 } 110 }
111 return true; 111 return true;
@@ -120,7 +120,7 @@ bool gfx_framebuffer_attach_depth(
120 glBindFramebuffer(GL_FRAMEBUFFER, framebuffer->id); 120 glBindFramebuffer(GL_FRAMEBUFFER, framebuffer->id);
121 framebuffer_attach_depth(framebuffer, attachment); 121 framebuffer_attach_depth(framebuffer, attachment);
122 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { 122 if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
123 set_error("glCheckFramebufferStatus() failed"); 123 log_error("glCheckFramebufferStatus() failed");
124 return false; 124 return false;
125 } 125 }
126 return true; 126 return true;