moved glError so that it is available without GLFONT

This commit is contained in:
Zeno Rogue 2018-02-03 20:03:16 +01:00
parent 0a7c07fa7d
commit e5f1670702
2 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

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