summaryrefslogtreecommitdiffstats
path: root/sdl/gltools.h
diff options
context:
space:
mode:
Diffstat (limited to 'sdl/gltools.h')
-rw-r--r--sdl/gltools.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/sdl/gltools.h b/sdl/gltools.h
index 0a53555..608b8aa 100644
--- a/sdl/gltools.h
+++ b/sdl/gltools.h
@@ -19,18 +19,29 @@ typedef struct
GLbyte bits; /* bits per pixel (8 16, 24, 32) */
GLbyte descriptor; /* image descriptor */
} TGAHEADER;
-#pragma pack(1)
+#pragma pack()
/* function prototypes */
+void gltListExtensions(void);
+void gltOpenGLInfo(void);
+GLboolean gltQueryExtension(const char *);
GLint gltWriteTGA(const char *);
GLbyte *gltLoadTGA(const char *, GLint *, GLint *, GLint *, GLenum *);
-void gltDrawSnowman(void);
-void gltDrawFigures(void);
-void gltDrawTriangle(void);
-void gltDrawGround(void);
-void gltDrawUnitAxes(void);
-void gltDrawTorus(GLfloat, GLfloat, GLint, GLint);
-void gltDrawJet(void);
+#ifdef _WIN32
+char *strsep(char**, const char*);
+#endif
+
+static inline void gltErrorCheck(void)
+{
+ GLenum err_code;
+ const GLubyte *err_str;
+
+ while ((err_code = glGetError()) != GL_NO_ERROR)
+ {
+ err_str = gluErrorString(err_code);
+ fprintf(stderr, "OpenGL error: %s\n", err_str);
+ }
+}
#endif