Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -2893,6 +2893,23 @@ void Application::displaySide(Camera& whichCamera) { · 2892 unmodified lines | |||
| 2893 | 2893 | ||
| 2894 | //draw a grid ground plane.... | 2894 | //draw a grid ground plane.... |
| 2895 | if (_renderGroundPlaneOn->isChecked()) { | 2895 | if (_renderGroundPlaneOn->isChecked()) { |
| 2896 | // draw grass plane with fog | ||
| 2897 | glEnable(GL_FOG); | ||
| 2898 | const float FOG_COLOR[] = { 1.0f, 1.0f, 1.0f, 1.0f }; | ||
| 2899 | glFogfv(GL_FOG_COLOR, FOG_COLOR); | ||
| 2900 | glFogi(GL_FOG_MODE, GL_EXP2); | ||
| 2901 | glFogf(GL_FOG_DENSITY, 0.025f); | ||
| 2902 | glPushMatrix(); | ||
| 2903 | const float GRASS_PLANE_SIZE = 256.0f; | ||
| 2904 | glTranslatef(-GRASS_PLANE_SIZE * 0.5f, -0.01f, GRASS_PLANE_SIZE * 0.5f); | ||
| 2905 | glScalef(GRASS_PLANE_SIZE, 1.0f, GRASS_PLANE_SIZE); | ||
| 2906 | glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); | ||
| 2907 | glColor3ub(70, 134, 74); | ||
| 2908 | const int GRASS_DIVISIONS = 40; | ||
| 2909 | _geometryCache.renderSquare(GRASS_DIVISIONS, GRASS_DIVISIONS); | ||
| 2910 | glPopMatrix(); | ||
| 2911 | glDisable(GL_FOG); | ||
| 2912 | |||
| 2896 | renderGroundPlaneGrid(EDGE_SIZE_GROUND_PLANE, _audio.getCollisionSoundMagnitude()); | 2913 | renderGroundPlaneGrid(EDGE_SIZE_GROUND_PLANE, _audio.getCollisionSoundMagnitude()); |
| 2897 | } | 2914 | } |
| 2898 | // Draw voxels | 2915 | // Draw voxels |