diff options
Diffstat (limited to 'src/graphics')
| -rw-r--r-- | src/graphics/Renderer.cpp | 11 | ||||
| -rw-r--r-- | src/graphics/Renderer.h | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 7467493..2924503 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -1086,17 +1086,17 @@ void Renderer::render_parts() glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); glTranslated(0, MENUSIZE, 0); #else - /*if (GRID_MODE)//draws the grid + if (gridSize)//draws the grid { for (ny=0; ny<YRES; ny++) for (nx=0; nx<XRES; nx++) { - if (ny%(4*GRID_MODE)==0) + if (ny%(4*gridSize)==0) blendpixel(nx, ny, 100, 100, 100, 80); - if (nx%(4*GRID_MODE)==0) + if (nx%(4*gridSize)==0) blendpixel(nx, ny, 100, 100, 100, 80); } - }*/ + } #endif for(i = 0; i<=sim->parts_lastActiveIndex; i++) { if (sim->parts[i].type) { @@ -2284,7 +2284,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim): mousePosY(-1), display_mode(0), render_mode(0), - colour_mode(0) + colour_mode(0), + gridSize(0) { this->g = g; this->sim = sim; diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 2f9f404..dc5d633 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -131,12 +131,16 @@ public: void SetColourMode(unsigned int mode); unsigned int GetColourMode(); + int GetGridSize() { return gridSize; } + void SetGridSize(int value) { gridSize = value; } + static VideoBuffer * WallIcon(int wallID, int width, int height); Renderer(Graphics * g, Simulation * sim); ~Renderer(); private: + int gridSize; #ifdef OGLR GLuint zoomTex, airBuf, fireAlpha, glowAlpha, blurAlpha, partsFboTex, partsFbo, partsTFX, partsTFY, airPV, airVY, airVX; GLuint fireProg, airProg_Pressure, airProg_Velocity, airProg_Cracker, lensProg; |
