Vivid
Loading...
Searching...
No Matches
Error.cpp
1
#include "Error.h"
2
#include <iostream>
3
4
void
GLClearError()
5
{
6
while
(glGetError() != GL_NO_ERROR)
7
;
8
}
9
10
bool
GLLogError(
const
char
* function,
const
char
* file,
int
line)
11
{
12
while
(GLenum error = glGetError())
13
{
14
15
std::cout <<
"[OpenGL Error] ("
<< error <<
")\nIn File "
<< file <<
"\nIn line"
<< line <<
"\nIn Function"
16
<< function;
17
return
false
;
18
}
19
return
true
;
20
}
21
23
void
ERROR(
const
char
* message)
24
{
25
// Error Message in Red
26
std::cerr <<
"\033[1;31m"
<< message <<
"\033[0m"
<< std::endl;
27
}
src
utils
Error.cpp
Generated by
1.9.6