aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/OpenGL/OpenGLRendererAPI.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-14 18:21:00 +0200
committerhachem <im@hachem.wtf>2025-08-14 18:21:00 +0200
commitbc2d88c799cb3913a5defe4ea9ddea9c56814349 (patch)
treeea60d47c5924ba56f6d84de9d7baa38f1710f13a /src/Platform/OpenGL/OpenGLRendererAPI.cpp
parent5265d5f8cacdb8af523e2b2fbfa45f0ef44b9995 (diff)
[help]: I am going to throw my computer out a window
Diffstat (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp')
-rw-r--r--src/Platform/OpenGL/OpenGLRendererAPI.cpp16
1 files changed, 16 insertions, 0 deletions
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>& vertexArray, uint32_t indexCount)
{
uint32_t count = indexCount ? indexCount : vertexArray->GetIndexBuffer()->GetCount();