diff options
author | Stijn Buys <ingar@osirion.org> | 2010-12-04 00:17:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-12-04 00:17:15 +0000 |
commit | affa3d2a6761c4040434e11726695ad6e53a4cab (patch) | |
tree | b707815ba3009c9bdc1f75759633ca9250396e0b /src/ui | |
parent | a92778d557df8bc853153d119224ea28390bdc9a (diff) |
Correct camera axis and clear depth buffer when rendering ui models.
Diffstat (limited to 'src/ui')
-rwxr-xr-x | src/ui/modelview.cc | 5 |
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); |