mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 20:03:58 +02:00
- bugfixes to avoid segfault when user has no sound card or openal cannot init
- more fallback handling for non power of two textures
This commit is contained in:
@@ -51,8 +51,13 @@ void checkGlExtension(const char *extensionName);
|
||||
void inline _assertGl(const char *file, int line, GLenum *forceErrorNumber = NULL) {
|
||||
GLenum error = (forceErrorNumber != NULL ? *forceErrorNumber : glGetError());
|
||||
if(error != GL_NO_ERROR) {
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
throw runtime_error("OpenGL error #" + intToStr(error) + " : " + string(errorString) + " at file: " + string(file) + ", line " + intToStr(line));
|
||||
//if(error != GL_INVALID_ENUM) {
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
char szBuf[4096]="";
|
||||
sprintf(szBuf,"OpenGL error #%d [0x%X] : [%s] at file: [%s], line: %d",error,error,errorString,file,line);
|
||||
//throw runtime_error("OpenGL error #" + intToStr(error) + " : " + string(errorString) + " at file: " + string(file) + ", line " + intToStr(line));
|
||||
throw runtime_error(szBuf);
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user