mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Add BuildGLErrorCheck(), useful for debugging GL.
git-svn-id: https://svn.eduke32.com/eduke32@5641 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e2df2d60d1
commit
aec2da83cd
2 changed files with 15 additions and 0 deletions
|
@ -90,6 +90,12 @@ typedef unsigned int GLenum;
|
|||
#define GL_TEXTURE_RECTANGLE 0x84F5
|
||||
|
||||
|
||||
// custom error checking
|
||||
|
||||
extern GLenum BuildGLError;
|
||||
extern void BuildGLErrorCheck(void);
|
||||
|
||||
|
||||
//////// dynamic/static API wrapping ////////
|
||||
|
||||
#if defined DYNAMIC_GL
|
||||
|
|
|
@ -11,6 +11,15 @@
|
|||
# include "sdlayer.h"
|
||||
#endif
|
||||
|
||||
GLenum BuildGLError;
|
||||
void BuildGLErrorCheck(void)
|
||||
{
|
||||
volatile GLenum err;
|
||||
while ((err = bglGetError()) != GL_NO_ERROR)
|
||||
{
|
||||
BuildGLError = err; // set a watchpoint/breakpoint here
|
||||
}
|
||||
}
|
||||
|
||||
#if defined DYNAMIC_GL
|
||||
|
||||
|
|
Loading…
Reference in a new issue