From 8a0b2a59c9809d5fc8e6a30c2abc4d5af21aa39e Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 13 Aug 2025 18:39:13 +0200 Subject: [fix]: More consistent formatting --- src/Platform/OpenGL/OpenGLRendererAPI.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp') diff --git a/src/Platform/OpenGL/OpenGLRendererAPI.cpp b/src/Platform/OpenGL/OpenGLRendererAPI.cpp index 5ee7d8d..7957fa0 100644 --- a/src/Platform/OpenGL/OpenGLRendererAPI.cpp +++ b/src/Platform/OpenGL/OpenGLRendererAPI.cpp @@ -1,10 +1,24 @@ #include "OpenGLRendererAPI.h" #include +#include +#include namespace Donut { void OpenGLRendererAPI::Init() { + if (!glfwGetCurrentContext()) + { + std::cout << "No OpenGL context is current! Cannot initialize GLAD." << std::endl; + return; + } + + if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) + { + std::cout << "Failed to initialize GLAD!" << std::endl; + return; + } + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_DEPTH_TEST); -- cgit v1.3