From 3d8d3259e1cf5a7d88e5d1e530cc8c9bf9140734 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 18:21:00 +0200 Subject: feat: I am going to throw my computer out a window --- src/platform/opengl/opengl_renderer_api.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/platform/opengl/opengl_renderer_api.cpp') diff --git a/src/platform/opengl/opengl_renderer_api.cpp b/src/platform/opengl/opengl_renderer_api.cpp index 4542231..628c0af 100644 --- a/src/platform/opengl/opengl_renderer_api.cpp +++ b/src/platform/opengl/opengl_renderer_api.cpp @@ -49,6 +49,11 @@ namespace Donut glEnable(GL_DEPTH_TEST); } + void OpenGLRendererAPI::disable_depth_test() + { + glDisable(GL_DEPTH_TEST); + } + void OpenGLRendererAPI::set_face_culling(bool enabled) { if (enabled) @@ -61,6 +66,17 @@ namespace Donut glDisable(GL_CULL_FACE); } + void OpenGLRendererAPI::enable_blending() + { + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + + void OpenGLRendererAPI::disable_blending() + { + glDisable(GL_BLEND); + } + void OpenGLRendererAPI::draw_indexed(const Ref& vertex_array, uint32_t index_count) { uint32_t count = index_count ? index_count : vertex_array->get_index_buffer()->get_count(); -- cgit v1.3