opengles renderer: added CHECK_GL_ERROR defie for gl debugging
This commit add CHECK_GL_ERROR define to decoders/renderer which enables various glGetError() calls. Also changed emugen to add glGetError() after every dispatch call (based on defintion of CHECK_GL_ERROR). Also cleaned some annoying printf's.
This commit is contained in:
committed by
Guy Zadickario
parent
3034c35701
commit
170eb97393
18
tools/emulator/opengl/shared/OpenglCodecCommon/GLErrorLog.h
Normal file
18
tools/emulator/opengl/shared/OpenglCodecCommon/GLErrorLog.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef __GL_ERROR_LOG_H__
|
||||
#define __GL_ERROR_LOG_H__
|
||||
|
||||
#include "ErrorLog.h"
|
||||
|
||||
#ifdef CHECK_GL_ERROR
|
||||
void dbg(){}
|
||||
#define GET_GL_ERROR(gl) \
|
||||
{ \
|
||||
int err = gl.glGetError(); \
|
||||
if (err) { dbg(); ERR("Error: 0x%X in %s (%s:%d)\n", err, __FUNCTION__, __FILE__, __LINE__); } \
|
||||
}
|
||||
|
||||
#else
|
||||
#define GET_GL_ERROR(gl)
|
||||
#endif
|
||||
|
||||
#endif //__GL_ERROR_LOG_H__
|
||||
Reference in New Issue
Block a user