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 | 0d8b874c0048ca088bb9e353a5f7c62e1f8cd0e8 (patch) | |
| tree | 2c0f3b13161489e4e91994882f8f2ed67a20bc0e /src/platform/opengl/opengl_renderer_api.cpp | |
| parent | 9671d5e54484b8bce261207d08ff15053ae24e48 (diff) | |
feat: custom memory managers and fix includes
Diffstat (limited to 'src/platform/opengl/opengl_renderer_api.cpp')
| -rw-r--r-- | src/platform/opengl/opengl_renderer_api.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/platform/opengl/opengl_renderer_api.cpp b/src/platform/opengl/opengl_renderer_api.cpp index 1d41735..4542231 100644 --- a/src/platform/opengl/opengl_renderer_api.cpp +++ b/src/platform/opengl/opengl_renderer_api.cpp @@ -1,7 +1,7 @@ #include "opengl_renderer_api.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::draw_indexed(const std::shared_ptr<VertexArray>& vertex_array, uint32_t index_count) + void OpenGLRendererAPI::draw_indexed(const Ref<VertexArray>& vertex_array, uint32_t index_count) { uint32_t count = index_count ? index_count : vertex_array->get_index_buffer()->get_count(); glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_INT, nullptr); |
