summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/base.h5
-rw-r--r--include/glbase.h6
-rw-r--r--lib/base.cc4
3 files changed, 10 insertions, 5 deletions
diff --git a/include/base.h b/include/base.h
index 25e914b..592d8d9 100644
--- a/include/base.h
+++ b/include/base.h
@@ -13,8 +13,9 @@ namespace mogltk {
int GetHeight(void);
virtual void Flip(void);
SDL_Surface * getsurface();
- void Enter2DMode();
- void Leave2DMode();
+ virtual void Enter2DMode();
+ virtual void Leave2DMode();
+ virtual bool is2D();
protected:
base(int, int, int, int);
void setsurface(SDL_Surface *) throw (GeneralException);
diff --git a/include/glbase.h b/include/glbase.h
index 7fa3b06..6328d94 100644
--- a/include/glbase.h
+++ b/include/glbase.h
@@ -11,10 +11,10 @@ namespace mogltk {
public:
glbase(int w = 640, int h = 480, int flags = 0) throw(GeneralException);
virtual ~glbase();
- void Enter2DMode(void);
- void Leave2DMode(void);
+ virtual void Enter2DMode(void);
+ virtual void Leave2DMode(void);
virtual void Flip(void);
- bool is2D(void);
+ virtual bool is2D(void);
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);
diff --git a/lib/base.cc b/lib/base.cc
index 8c1c862..dcaf167 100644
--- a/lib/base.cc
+++ b/lib/base.cc
@@ -75,3 +75,7 @@ void mogltk::base::Enter2DMode() {
void mogltk::base::Leave2DMode() {
}
+
+bool mogltk::base::is2D() {
+ return true;
+}