summaryrefslogtreecommitdiff
path: root/lib/glbase.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glbase.cc')
-rw-r--r--lib/glbase.cc30
1 files changed, 22 insertions, 8 deletions
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 <SDL.h>
#include <SDL_opengl.h>
+#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);
}