From 8a21823469ecd777fe4cac1fc38a424bb3faf7fb Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 8 May 2013 12:11:48 -0700 Subject: [PATCH] Render the stars, when enabled, before the atmosphere. --- interface/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index bc33c996e1..dfd557f93c 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -683,11 +683,6 @@ void renderViewFrustum(ViewFrustum& viewFrustum) { void displaySide(Camera& whichCamera) { glPushMatrix(); - // draw the sky dome - if (::atmosphereOn) { - environment.renderAtmosphere(whichCamera); - } - if (::starsOn) { // should be the first rendering pass - w/o depth buffer / lighting @@ -695,6 +690,11 @@ void displaySide(Camera& whichCamera) { stars.render(whichCamera.getFieldOfView(), aspectRatio, whichCamera.getNearClip()); } + // draw the sky dome + if (::atmosphereOn) { + environment.renderAtmosphere(whichCamera); + } + glEnable(GL_LIGHTING); glEnable(GL_DEPTH_TEST);