summaryrefslogtreecommitdiff
path: root/mogltk
diff options
context:
space:
mode:
authorpixel <pixel>2002-11-16 00:35:22 +0000
committerpixel <pixel>2002-11-16 00:35:22 +0000
commit04b1d5b77ec28aa74dc3aea7368f661221bdcb24 (patch)
tree1116a403202ece4c6060ba1549e892389482a9d8 /mogltk
parentd67b7a1fdb23fdd349af4514db3fd94dbae7ef9c (diff)
Bleh
Diffstat (limited to 'mogltk')
-rw-r--r--mogltk/glbase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/mogltk/glbase.cpp b/mogltk/glbase.cpp
index dabf28a..11d15ae 100644
--- a/mogltk/glbase.cpp
+++ b/mogltk/glbase.cpp
@@ -62,6 +62,9 @@ int mogltk::glbase::setup(int w, int h, int flags) throw(GeneralException) {
glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ Flip();
+
return 0;
}
@@ -115,6 +118,7 @@ void mogltk::glbase::Leave2DMode(void) {
void mogltk::glbase::Flip() {
SDL_GL_SwapBuffers();
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
bool mogltk::glbase::is2D() {