From 822bea0a87305675830b7038e138a1d2a988a904 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 9 Dec 2002 08:45:30 +0000 Subject: Bleh --- include/glbase.h | 6 +++--- lib/glbase.cc | 30 ++++++++++++++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/include/glbase.h b/include/glbase.h index 1852250..39c7493 100644 --- a/include/glbase.h +++ b/include/glbase.h @@ -16,10 +16,10 @@ namespace mogltk { static void Leave2DMode(void); static void Flip(void); static bool is2D(void); - static void glVertex(GLdouble, GLdouble, GLdouble = 0.0, GLdouble = 1.0); - static void glVertex(GLfloat, GLfloat, GLfloat = 0.0, GLfloat = 1.0); - static void glVertex(GLint, GLint, GLint = 0, GLint = 1); static void glVertex(GLshort, GLshort, GLshort = 0, GLshort = 1); + static void glVertex(GLint, GLint, GLint = 0, GLint = 1); + static void glVertex(GLfloat, GLfloat, GLfloat = 0.0, GLfloat = 1.0); + static void glVertex(GLdouble, GLdouble, GLdouble = 0.0, GLdouble = 1.0); private: static int width, height, inited, twoD; static SDL_Surface * surface; 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