mirror of
https://github.com/glest/glest-source.git
synced 2025-10-02 02:16:40 +02:00
- got built in memory leak working. Just edit leak_dumper.h and uncomment:
//#define SL_LEAK_DUMP - got better / more accurate stack dumps when we detect errors in game. - Both of these need to be worked on in windows next, win32 may not compile for now until i fix it on that platform. - BE VERY CAREFUL when working in leak_dumper.* it may cause GCC and your system to crash if you don't know what you are doing!
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include <string>
|
||||
#include "conversion.h"
|
||||
#include "gl_wrap.h"
|
||||
#include "platform_util.h"
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using std::runtime_error;
|
||||
@@ -62,8 +63,8 @@ void inline _assertGl(const char *file, int line, GLenum *forceErrorNumber = NUL
|
||||
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);
|
||||
//throw megaglest_runtime_error("OpenGL error #" + intToStr(error) + " : " + string(errorString) + " at file: " + string(file) + ", line " + intToStr(line));
|
||||
throw megaglest_runtime_error(szBuf);
|
||||
//}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user