mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:07:07 +02:00
Render environment -> render atmosphere.
This commit is contained in:
parent
4567c31a26
commit
8d4a74cf03
3 changed files with 9 additions and 9 deletions
|
@ -32,7 +32,7 @@ void Environment::init() {
|
||||||
_g2Location = _skyFromAtmosphereProgram->getUniformLocation("g2");
|
_g2Location = _skyFromAtmosphereProgram->getUniformLocation("g2");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Environment::render(Camera& camera) {
|
void Environment::renderAtmosphere(Camera& camera) {
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef(getAtmosphereCenter().x, getAtmosphereCenter().y, getAtmosphereCenter().z);
|
glTranslatef(getAtmosphereCenter().x, getAtmosphereCenter().y, getAtmosphereCenter().z);
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Environment : public EnvironmentData {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void render(Camera& camera);
|
void renderAtmosphere(Camera& camera);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -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 statsOn = false; // Whether to show onscreen text overlay with stats
|
||||||
bool starsOn = false; // Whether to display the stars
|
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
|
bool paintOn = false; // Whether to paint voxels as you fly around
|
||||||
VoxelDetail paintingVoxel; // The voxel we're painting if we're painting
|
VoxelDetail paintingVoxel; // The voxel we're painting if we're painting
|
||||||
unsigned char dominantColor = 0; // The dominant color of the voxel 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();
|
glPushMatrix();
|
||||||
|
|
||||||
// draw the sky dome
|
// draw the sky dome
|
||||||
if (::environmentOn) {
|
if (::atmosphereOn) {
|
||||||
environment.render(whichCamera);
|
environment.renderAtmosphere(whichCamera);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (::starsOn) {
|
if (::starsOn) {
|
||||||
|
@ -1216,8 +1216,8 @@ int setStars(int state) {
|
||||||
return setValue(state, &::starsOn);
|
return setValue(state, &::starsOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int setEnvironment(int state) {
|
int setAtmosphere(int state) {
|
||||||
return setValue(state, &::environmentOn);
|
return setValue(state, &::atmosphereOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int setOculus(int state) {
|
int setOculus(int state) {
|
||||||
|
@ -1365,7 +1365,7 @@ void initMenu() {
|
||||||
menuColumnRender = menu.addColumn("Render");
|
menuColumnRender = menu.addColumn("Render");
|
||||||
menuColumnRender->addRow("Voxels (V)", setVoxels);
|
menuColumnRender->addRow("Voxels (V)", setVoxels);
|
||||||
menuColumnRender->addRow("Stars (*)", setStars);
|
menuColumnRender->addRow("Stars (*)", setStars);
|
||||||
menuColumnRender->addRow("Environment (E)", setEnvironment);
|
menuColumnRender->addRow("Atmosphere (A)", setAtmosphere);
|
||||||
menuColumnRender->addRow("Oculus (o)", setOculus);
|
menuColumnRender->addRow("Oculus (o)", setOculus);
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
|
@ -1548,7 +1548,7 @@ void key(unsigned char k, int x, int y) {
|
||||||
if (k == '/') ::statsOn = !::statsOn; // toggle stats
|
if (k == '/') ::statsOn = !::statsOn; // toggle stats
|
||||||
if (k == '*') ::starsOn = !::starsOn; // toggle stars
|
if (k == '*') ::starsOn = !::starsOn; // toggle stars
|
||||||
if (k == 'V' || k == 'v') ::showingVoxels = !::showingVoxels; // toggle voxels
|
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 == 'F') ::frustumOn = !::frustumOn; // toggle view frustum debugging
|
||||||
if (k == 'C') ::cameraFrustum = !::cameraFrustum; // toggle which frustum to look at
|
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
|
if (k == 'O' || k == 'G') setFrustumOffset(MENU_ROW_PICKED); // toggle view frustum offset debugging
|
||||||
|
|
Loading…
Reference in a new issue