- 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:
Mark Vejvoda
2012-04-14 21:21:09 +00:00
parent ed201fa5d3
commit 8c0bf75bf5
117 changed files with 1760 additions and 1071 deletions

View File

@@ -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);
//}
}