diff --git a/basegraph.cpp b/basegraph.cpp index a2d63502..81bd8ead 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -340,6 +340,13 @@ inline int next_p2 (int a ) return rval; } +void glError(const char* GLcall, const char* file, const int line) { + GLenum errCode = glGetError(); + if(errCode!=GL_NO_ERROR) { + fprintf(stderr, "OPENGL ERROR #%i: in file %s on line %i :: %s\n",errCode,file, line, GLcall); + } + } + #if CAP_GLFONT struct glfont_t { @@ -353,13 +360,6 @@ struct glfont_t { glfont_t *glfont[256]; -void glError(const char* GLcall, const char* file, const int line) { - GLenum errCode = glGetError(); - if(errCode!=GL_NO_ERROR) { - // fprintf(stderr, "OPENGL ERROR #%i: in file %s on line %i :: %s\n",errCode,file, line, GLcall); - } - } - void sdltogl(SDL_Surface *txt, glfont_t& f, int ch) { #if CAP_TABFONT int otwidth, otheight, tpix[3000], tpixindex = 0; diff --git a/rug.cpp b/rug.cpp index f37fde1d..1e7669fc 100644 --- a/rug.cpp +++ b/rug.cpp @@ -1124,10 +1124,10 @@ void drawRugScene() { #ifndef GLES_ONLY glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - GLERR("lighting"); #else glLightModelx(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); #endif + GLERR("lighting"); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0);