MCPcopy Create free account
hub / github.com/Angelo1211/HybridRenderingEngine / glCheckError_

Method glCheckError_

src/debugUtils.cpp:13–29  ·  view source on GitHub ↗

Determine what OpenGL error you are facing specifically

Source from the content-addressed store, hash-verified

11
12//Determine what OpenGL error you are facing specifically
13GLenum HREUtils::glCheckError_(const char *file, int line){
14 GLenum errorCode;
15 while((errorCode = glGetError()) != GL_NO_ERROR){
16 std::string error;
17 switch(errorCode){
18 case GL_INVALID_ENUM: error = "Invalid Enum"; break;
19 case GL_INVALID_VALUE: error = "Invalid value"; break;
20 case GL_INVALID_OPERATION: error = "Invalid operation"; break;
21 case GL_STACK_OVERFLOW: error = "stack overflow"; break;
22 case GL_STACK_UNDERFLOW: error = "stack underflow"; break;
23 case GL_OUT_OF_MEMORY: error = "out of memory"; break;
24 case GL_INVALID_FRAMEBUFFER_OPERATION: error = "invalid framebuffer operation"; break;
25 }
26 printf("%s, | %s ( %d ) \n", error.c_str(), file, line);
27 }
28 return errorCode;
29}
30
31//Finding the max sizes for compute units
32void HREUtils::printComputeSizes(){

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected