Inserted OpenGL Error checking

This commit is contained in:
2023-07-23 13:57:25 -07:00
parent 5b01eb904d
commit a94b16e23f
20 changed files with 305 additions and 132 deletions

View File

@ -10,7 +10,6 @@
#include "dawnopengl.hpp"
#include "display/BackBufferRenderTarget.hpp"
using namespace Dawn;
// Static declaration of the host, needed due to GLFW events being C-like
@ -54,12 +53,14 @@ int32_t DawnHost::init(DawnGame *game) {
glfwMakeContextCurrent(this->data->window);
glfwSwapInterval(1);
gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
assertNoGLError();
// Override the defaults
game->renderManager.backBuffer.setSize(
DAWN_GLFW_WINDOW_WIDTH_DEFAULT,
DAWN_GLFW_WINDOW_HEIGHT_DEFAULT
);
assertNoGLError();
// Default keybinds
game->inputManager.bind(INPUT_BIND_ACCEPT, GLFW_KEY_ENTER);