From bc2d88c799cb3913a5defe4ea9ddea9c56814349 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 18:21:00 +0200 Subject: [help]: I am going to throw my computer out a window --- src/Platform/OpenGL/OpenGLRendererAPI.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp') diff --git a/src/Platform/OpenGL/OpenGLRendererAPI.cpp b/src/Platform/OpenGL/OpenGLRendererAPI.cpp index 3c49144..d181203 100644 --- a/src/Platform/OpenGL/OpenGLRendererAPI.cpp +++ b/src/Platform/OpenGL/OpenGLRendererAPI.cpp @@ -49,6 +49,11 @@ namespace Donut glEnable(GL_DEPTH_TEST); } + void OpenGLRendererAPI::DisableDepthTest() + { + glDisable(GL_DEPTH_TEST); + } + void OpenGLRendererAPI::SetFaceCulling(bool enabled) { if (enabled) @@ -61,6 +66,17 @@ namespace Donut glDisable(GL_CULL_FACE); } + void OpenGLRendererAPI::EnableBlending() + { + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + + void OpenGLRendererAPI::DisableBlending() + { + glDisable(GL_BLEND); + } + void OpenGLRendererAPI::DrawIndexed(const Ref& vertexArray, uint32_t indexCount) { uint32_t count = indexCount ? indexCount : vertexArray->GetIndexBuffer()->GetCount(); -- cgit v1.3