diff options
| author | hachem <im@hachem.wtf> | 2025-08-14 00:42:05 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-14 00:42:05 +0200 |
| commit | e050dce79b67ae6386240567a994454711ab998d (patch) | |
| tree | 4b5f55471d86b8ee80d531696e65dcea3b713e7a /src/Platform/OpenGL/OpenGLRendererAPI.cpp | |
| parent | 2e246683df3b18e8e129adb0ada25be5f82f5b59 (diff) | |
[add]: Custom memory managers and fix includes
Diffstat (limited to 'src/Platform/OpenGL/OpenGLRendererAPI.cpp')
| -rw-r--r-- | src/Platform/OpenGL/OpenGLRendererAPI.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Platform/OpenGL/OpenGLRendererAPI.cpp b/src/Platform/OpenGL/OpenGLRendererAPI.cpp index 7957fa0..3c49144 100644 --- a/src/Platform/OpenGL/OpenGLRendererAPI.cpp +++ b/src/Platform/OpenGL/OpenGLRendererAPI.cpp @@ -1,7 +1,7 @@ #include "OpenGLRendererAPI.h" + #include <glad/glad.h> #include <GLFW/glfw3.h> -#include <iostream> namespace Donut { @@ -9,13 +9,13 @@ namespace Donut { if (!glfwGetCurrentContext()) { - std::cout << "No OpenGL context is current! Cannot initialize GLAD." << std::endl; + DONUT_ERROR("No OpenGL context is current! Cannot initialize GLAD."); return; } if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { - std::cout << "Failed to initialize GLAD!" << std::endl; + DONUT_ERROR("Failed to initialize GLAD!"); return; } @@ -61,7 +61,7 @@ namespace Donut glDisable(GL_CULL_FACE); } - void OpenGLRendererAPI::DrawIndexed(const std::shared_ptr<VertexArray>& vertexArray, uint32_t indexCount) + void OpenGLRendererAPI::DrawIndexed(const Ref<VertexArray>& vertexArray, uint32_t indexCount) { uint32_t count = indexCount ? indexCount : vertexArray->GetIndexBuffer()->GetCount(); glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, nullptr); |
