Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rwxr-xr-xsrc/ui/modelview.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index 6d4e0e4..613382a 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -155,8 +155,6 @@ void ModelView::draw()
math ::Vector2f center(global_location() + size() * 0.5f);
- gl::clear(GL_DEPTH_BUFFER_BIT);
-
const float minscreen(math::min(root()->width(),root()->height()));
const float minwidget(math::min(width(), height()));
const float reference_radius = radius() * minwidget / minscreen;
@@ -178,6 +176,9 @@ void ModelView::draw()
gl::enable(GL_CULL_FACE); // enable culling
gl::enable(GL_COLOR_MATERIAL); // enable color tracking
+ // clear depth buffer
+ gl::clear(GL_DEPTH_BUFFER_BIT);
+
// enable vertex arrays
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);