diff options
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); |
