summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-07 00:42:14 +0000
committerpixel <pixel>2002-12-07 00:42:14 +0000
commit11f44e36d5f02f8309fc463f9a2c6cd81b42c3ce (patch)
treee0daba1124a46dd6dc30150066324f62c6c9eedc /include
parent70ab3da408f5939fbfec4237e87f503ae82b2179 (diff)
Whoups
Diffstat (limited to 'include')
-rw-r--r--include/engine.h16
-rw-r--r--include/glbase.h29
-rw-r--r--include/glfont.h25
-rw-r--r--include/gltexture.h26
4 files changed, 96 insertions, 0 deletions
diff --git a/include/engine.h b/include/engine.h
new file mode 100644
index 0000000..2b8af3c
--- /dev/null
+++ b/include/engine.h
@@ -0,0 +1,16 @@
+#ifndef __ENGINE_H__
+#define __ENGINE_H__
+
+#include <IRC.h>
+
+namespace mogltk {
+ class engine : public Base {
+ public:
+ static int setup() throw(GeneralException);
+ static int GetInited();
+ private:
+ static int inited;
+ };
+};
+
+#endif
diff --git a/include/glbase.h b/include/glbase.h
new file mode 100644
index 0000000..1852250
--- /dev/null
+++ b/include/glbase.h
@@ -0,0 +1,29 @@
+#ifndef __GLBASE_H__
+#define __GLBASE_H__
+
+#include <GL/gl.h>
+#include <SDL.h>
+#include <Exceptions.h>
+
+namespace mogltk {
+ class glbase : public Base {
+ public:
+ static int setup(int w = 640, int h = 480, int flags = 0) throw(GeneralException);
+ static int GetWidth(void);
+ static int GetHeight(void);
+ static int GetInited(void);
+ static void Enter2DMode(void);
+ 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);
+ private:
+ static int width, height, inited, twoD;
+ static SDL_Surface * surface;
+ };
+};
+
+#endif
diff --git a/include/glfont.h b/include/glfont.h
new file mode 100644
index 0000000..de4ef63
--- /dev/null
+++ b/include/glfont.h
@@ -0,0 +1,25 @@
+#ifndef __GLFONT_H__
+#define __GLFONT_H__
+
+#include <SDL.h>
+#include <String.h>
+#include <Color.h>
+#include "gltexture.h"
+
+namespace mogltk {
+ class font : public Base {
+ public:
+ font(const String & = "font.bin");
+ virtual ~font();
+ void drawentry(Uint16, Color = Color(255, 255, 255), int = -1, int = -1);
+
+ private:
+ Uint8 * sizes;
+ Uint16 nbentries, nbcT, nbT;
+ Uint8 flags, maxX, maxY, nbcU, nbcV;
+ texture ** fonttex;
+ Uint16 * corresp;
+ };
+};
+
+#endif
diff --git a/include/gltexture.h b/include/gltexture.h
new file mode 100644
index 0000000..c18e6ec
--- /dev/null
+++ b/include/gltexture.h
@@ -0,0 +1,26 @@
+#ifndef __GLTEXTURE_H__
+#define __GLTEXTURE_H__
+
+#include <GL/gl.h>
+#include <SDL.h>
+#include <Exceptions.h>
+
+namespace mogltk {
+ class texture : public Base {
+ public:
+ texture(int = 256, int = 256, bool = false) throw (GeneralException);
+ virtual ~texture();
+ SDL_Surface * GetSurface() throw (GeneralException);
+ void Generate() throw (GeneralException);
+ void Bind(bool = true) throw (GeneralException);
+ GLuint GetWidth();
+ GLuint GetHeight();
+ static void Unbind(void);
+ private:
+ GLuint width, height, tex;
+ SDL_Surface * surface;
+ bool planar;
+ };
+};
+
+#endif