From 822bea0a87305675830b7038e138a1d2a988a904 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 9 Dec 2002 08:45:30 +0000 Subject: Bleh --- lib/glbase.cc | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'lib/glbase.cc') diff --git a/lib/glbase.cc b/lib/glbase.cc index 240b450..214f2d9 100644 --- a/lib/glbase.cc +++ b/lib/glbase.cc @@ -4,6 +4,8 @@ #include #include +#define DEBUG 1 + int mogltk::glbase::width, mogltk::glbase::height, mogltk::glbase::inited = 0, mogltk::glbase::twoD = 0; SDL_Surface * mogltk::glbase::surface = 0; @@ -124,19 +126,31 @@ bool mogltk::glbase::is2D() { return twoD; } -void mogltk::glbase::glVertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { - glVertex4d(x, y, z, w); -} - -void mogltk::glbase::glVertex(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - glVertex4f(x, y, z, w); +void mogltk::glbase::glVertex(GLshort x, GLshort y, GLshort z, GLshort w) { +#ifdef DEBUG + printm(M_INFO, "Calling glVertex(%i, %i, %i, %i) (shorts)\n", x, y, z, w); +#endif + glVertex4i(x, y, z, w); } void mogltk::glbase::glVertex(GLint x, GLint y, GLint z, GLint w) { +#ifdef DEBUG + printm(M_INFO, "Calling glVertex(%i, %i, %i, %i) (ints)\n", x, y, z, w); +#endif glVertex4i(x, y, z, w); } -void mogltk::glbase::glVertex(GLshort x, GLshort y, GLshort z, GLshort w) { - glVertex4i(x, y, z, w); +void mogltk::glbase::glVertex(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { +#ifdef DEBUG + printm(M_INFO, "Calling glVertex(%f, %f, %f, %f) (floats)\n", x, y, z, w); +#endif + glVertex4f(x, y, z, w); +} + +void mogltk::glbase::glVertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w) { +#ifdef DEBUG + printm(M_INFO, "Calling glVertex(%f, %f, %f, %f) (doubles)\n", x, y, z, w); +#endif + glVertex4d(x, y, z, w); } -- cgit v1.2.3