void SkyRender () { if (sky && !RenderFlat ()) sky->Render (); }
void EntityRender () { int polymode[2]; bool wireframe; int x, y; int elapsed; //Draw all textured objects glGetIntegerv (GL_POLYGON_MODE, &polymode[0]); wireframe = polymode[0] != GL_FILL; if (RenderFlat ()) glDisable (GL_TEXTURE_2D); //If we're not using a loading screen, make the wireframe fade out via fog if (!LOADING_SCREEN && wireframe) { elapsed = 6000 - WorldSceneElapsed (); if (elapsed >= 0 && elapsed <= 6000) RenderFogFX ((float)elapsed / 6000.0f); else return; } for (x = 0; x < GRID_SIZE; x++) { for (y = 0; y < GRID_SIZE; y++) { if (Visible (x,y)) glCallList (cell_list[x][y].list_textured); } } //draw all flat colored objects glBindTexture(GL_TEXTURE_2D, 0); glColor3f (0, 0, 0); for (x = 0; x < GRID_SIZE; x++) { for (y = 0; y < GRID_SIZE; y++) { if (Visible (x, y)) { if (wireframe) glCallList (cell_list[x][y].list_flat_wireframe); else glCallList (cell_list[x][y].list_flat); } } } //draw all alpha-blended objects glBindTexture(GL_TEXTURE_2D, 0); glColor3f (0, 0, 0); glEnable (GL_BLEND); for (x = 0; x < GRID_SIZE; x++) { for (y = 0; y < GRID_SIZE; y++) { if (Visible (x,y)) { glCallList (cell_list[x][y].list_alpha); } } } }