summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-09 08:45:30 +0000
committerpixel <pixel>2002-12-09 08:45:30 +0000
commit822bea0a87305675830b7038e138a1d2a988a904 (patch)
tree45069bbff9b7a8fdbd97d1ed04593dc59d489b3f /lib
parent8125f1f4ee8215a4486acd514b1c96a2957fa809 (diff)
Bleh
Diffstat (limited to 'lib')
-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);
}