diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 02:19:29 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 02:32:34 +0200 |
| commit | 31f6a54d35dd13f0911f132dc60f5f0d851d7e43 (patch) | |
| tree | 75b5410d785a5acc9e435d4147f3de4989278172 /src/platform/opengl/opengl_framebuffer.cpp | |
| parent | 0f9483ce025b015b1197b7a7efc8ed983bedbb8e (diff) | |
refactor: trailing return types in the OpenGL and Metal backends
Diffstat (limited to 'src/platform/opengl/opengl_framebuffer.cpp')
| -rw-r--r-- | src/platform/opengl/opengl_framebuffer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/platform/opengl/opengl_framebuffer.cpp b/src/platform/opengl/opengl_framebuffer.cpp index 9040994..c6e646a 100644 --- a/src/platform/opengl/opengl_framebuffer.cpp +++ b/src/platform/opengl/opengl_framebuffer.cpp @@ -109,7 +109,7 @@ namespace Donut glDeleteTextures(1, &m_depth_attachment); } - void OpenGLFramebuffer::invalidate() + auto OpenGLFramebuffer::invalidate() -> void { if (m_renderer_id) { @@ -204,18 +204,18 @@ namespace Donut glBindFramebuffer(GL_FRAMEBUFFER, 0); } - void OpenGLFramebuffer::bind() + auto OpenGLFramebuffer::bind() -> void { glBindFramebuffer(GL_FRAMEBUFFER, m_renderer_id); glViewport(0, 0, m_specification.Width, m_specification.Height); } - void OpenGLFramebuffer::unbind() + auto OpenGLFramebuffer::unbind() -> void { glBindFramebuffer(GL_FRAMEBUFFER, 0); } - void OpenGLFramebuffer::resize(uint32_t width, uint32_t height) + auto OpenGLFramebuffer::resize(uint32_t width, uint32_t height) -> void { m_specification.Width = width; m_specification.Height = height; @@ -223,7 +223,7 @@ namespace Donut invalidate(); } - int OpenGLFramebuffer::read_pixel(uint32_t attachment_index, int x, int y) + auto OpenGLFramebuffer::read_pixel(uint32_t attachment_index, int x, int y) -> int { glReadBuffer(GL_COLOR_ATTACHMENT0 + attachment_index); int pixel_data; @@ -231,7 +231,7 @@ namespace Donut return pixel_data; } - void OpenGLFramebuffer::clear_attachment(uint32_t attachment_index, int value) + auto OpenGLFramebuffer::clear_attachment(uint32_t attachment_index, int value) -> void { glBindFramebuffer(GL_FRAMEBUFFER, m_renderer_id); glClearBufferiv(GL_COLOR, static_cast<GLint>(attachment_index), &value); |
