From 8d4a74cf03522e96c781eb11aeb0312aff9048fa Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Wed, 8 May 2013 10:00:31 -0700 Subject: [PATCH] Render environment -> render atmosphere. --- interface/src/Environment.cpp | 2 +- interface/src/Environment.h | 2 +- interface/src/main.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/src/Environment.cpp b/interface/src/Environment.cpp index 56eb0ab7d1..224055ae27 100644 --- a/interface/src/Environment.cpp +++ b/interface/src/Environment.cpp @@ -32,7 +32,7 @@ void Environment::init() { _g2Location = _skyFromAtmosphereProgram->getUniformLocation("g2"); } -void Environment::render(Camera& camera) { +void Environment::renderAtmosphere(Camera& camera) { glMatrixMode(GL_MODELVIEW); glPushMatrix(); glTranslatef(getAtmosphereCenter().x, getAtmosphereCenter().y, getAtmosphereCenter().z); diff --git a/interface/src/Environment.h b/interface/src/Environment.h index e9be491d9c..51d7b92e1e 100644 --- a/interface/src/Environment.h +++ b/interface/src/Environment.h @@ -19,7 +19,7 @@ class Environment : public EnvironmentData { public: void init(); - void render(Camera& camera); + void renderAtmosphere(Camera& camera); private: diff --git a/interface/src/main.cpp b/interface/src/main.cpp index c030a9314b..20de0099c0 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -145,7 +145,7 @@ bool renderWarningsOn = false; // Whether to show render pipeline warnings bool statsOn = false; // Whether to show onscreen text overlay with stats bool starsOn = false; // Whether to display the stars -bool environmentOn = true; // Whether to display the environment +bool atmosphereOn = true; // Whether to display the atmosphere bool paintOn = false; // Whether to paint voxels as you fly around VoxelDetail paintingVoxel; // The voxel we're painting if we're painting unsigned char dominantColor = 0; // The dominant color of the voxel we're painting @@ -684,8 +684,8 @@ void displaySide(Camera& whichCamera) { glPushMatrix(); // draw the sky dome - if (::environmentOn) { - environment.render(whichCamera); + if (::atmosphereOn) { + environment.renderAtmosphere(whichCamera); } if (::starsOn) { @@ -1216,8 +1216,8 @@ int setStars(int state) { return setValue(state, &::starsOn); } -int setEnvironment(int state) { - return setValue(state, &::environmentOn); +int setAtmosphere(int state) { + return setValue(state, &::atmosphereOn); } int setOculus(int state) { @@ -1365,7 +1365,7 @@ void initMenu() { menuColumnRender = menu.addColumn("Render"); menuColumnRender->addRow("Voxels (V)", setVoxels); menuColumnRender->addRow("Stars (*)", setStars); - menuColumnRender->addRow("Environment (E)", setEnvironment); + menuColumnRender->addRow("Atmosphere (A)", setAtmosphere); menuColumnRender->addRow("Oculus (o)", setOculus); // Tools @@ -1548,7 +1548,7 @@ void key(unsigned char k, int x, int y) { if (k == '/') ::statsOn = !::statsOn; // toggle stats if (k == '*') ::starsOn = !::starsOn; // toggle stars if (k == 'V' || k == 'v') ::showingVoxels = !::showingVoxels; // toggle voxels - if (k == 'E') ::environmentOn = !::environmentOn; + if (k == 'A') ::atmosphereOn = !::atmosphereOn; if (k == 'F') ::frustumOn = !::frustumOn; // toggle view frustum debugging if (k == 'C') ::cameraFrustum = !::cameraFrustum; // toggle which frustum to look at if (k == 'O' || k == 'G') setFrustumOffset(MENU_ROW_PICKED); // toggle view frustum offset debugging