mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-06 00:33:01 +00:00
moved glError so that it is available without GLFONT
This commit is contained in:
@@ -340,6 +340,13 @@ inline int next_p2 (int a )
|
|||||||
return rval;
|
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
|
#if CAP_GLFONT
|
||||||
|
|
||||||
struct glfont_t {
|
struct glfont_t {
|
||||||
@@ -353,13 +360,6 @@ struct glfont_t {
|
|||||||
|
|
||||||
glfont_t *glfont[256];
|
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) {
|
void sdltogl(SDL_Surface *txt, glfont_t& f, int ch) {
|
||||||
#if CAP_TABFONT
|
#if CAP_TABFONT
|
||||||
int otwidth, otheight, tpix[3000], tpixindex = 0;
|
int otwidth, otheight, tpix[3000], tpixindex = 0;
|
||||||
|
|||||||
2
rug.cpp
2
rug.cpp
@@ -1124,10 +1124,10 @@ void drawRugScene() {
|
|||||||
|
|
||||||
#ifndef GLES_ONLY
|
#ifndef GLES_ONLY
|
||||||
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
|
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
|
||||||
GLERR("lighting");
|
|
||||||
#else
|
#else
|
||||||
glLightModelx(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
|
glLightModelx(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
GLERR("lighting");
|
||||||
|
|
||||||
glEnable(GL_LIGHTING);
|
glEnable(GL_LIGHTING);
|
||||||
glEnable(GL_LIGHT0);
|
glEnable(GL_LIGHT0);
|
||||||
|
|||||||
Reference in New Issue
Block a user