human_render/src/RHI/OpenglDrv/gl.h

18 lines
374 B
C
Raw Normal View History

2024-11-28 17:09:00 +00:00
#pragma once
2024-12-01 17:31:51 +00:00
#include "Core/Logger.h"
2024-11-28 17:09:00 +00:00
#define GLEW_STATIC
#include <GL/glew.h>
#include <glfw/glfw3.h>
2024-12-01 17:31:51 +00:00
2024-12-02 15:01:10 +00:00
inline void CheckGLError(const char* file, int line) {
GLenum err = glGetError();
if (err != GL_NO_ERROR) {
ERRORLOG("GL Error: {} - {}:{}", err, file, line);
assert(false);
2024-12-01 17:31:51 +00:00
}
2024-12-02 15:01:10 +00:00
}
#define __CHECK_GL_ERROR__ CheckGLError(__FILE__, __LINE__);