Vivid
Loading...
Searching...
No Matches
Error.h
1#pragma once
2
3#include "common/types/SmartPointers.h"
4#include "common/types/OpenGLTypes.h"
5#include <iostream>
6
7#define ASSERT(x) \
8 if (!(x)) \
9 std::cerr << "\nAssertion failed: " << #x << std::endl
10
11#define GLCall(x) \
12 GLClearError(); \
13 x; \
14 ASSERT(GLLogError(#x, __FILE__, __LINE__))
15
16void GLClearError();
17bool GLLogError(const char* function, const char* file, int line);
18void ERROR(const char* message);