diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 17:25:21 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-11-12 17:25:21 (GMT) |
| commit | 1b984200f3059680f6ad3cfe9805bff234d00737 (patch) | |
| tree | ded8d6d42e01bf8d8f4de4f7fc98362da32c3249 /src | |
| parent | bca76b0796b529ada8deb74da9e2fbd5aa4ee5ab (diff) | |
| download | powder-1b984200f3059680f6ad3cfe9805bff234d00737.zip powder-1b984200f3059680f6ad3cfe9805bff234d00737.tar.gz | |
Grid Mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics.c | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/graphics.c b/src/graphics.c index 9b29a6b..d1d0fd7 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1654,23 +1654,35 @@ GLfloat lineC[(((YRES*XRES)*2)*6)]; void render_parts(pixel *vid) { //TODO: Replace cmode with a set of flags - int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y, caddress; - float gradv, flicker, fnx, fny; + int deca, decr, decg, decb, cola, colr, colg, colb, firea, firer, fireg, fireb, pixel_mode, q, i, t, nx, ny, x, y, caddress; + float gradv, flicker, fnx, fny; #ifdef OGLR - int cfireV = 0, cfireC = 0, cfire = 0; - int csmokeV = 0, csmokeC = 0, csmoke = 0; - int cblobV = 0, cblobC = 0, cblob = 0; - int cblurV = 0, cblurC = 0, cblur = 0; - int cglowV = 0, cglowC = 0, cglow = 0; - int cflatV = 0, cflatC = 0, cflat = 0; - int caddV = 0, caddC = 0, cadd = 0; - int clineV = 0, clineC = 0, cline = 0; - GLuint origBlendSrc, origBlendDst; - - glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); - glGetIntegerv(GL_BLEND_DST, &origBlendDst); - //Render to the particle FBO - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); + int cfireV = 0, cfireC = 0, cfire = 0; + int csmokeV = 0, csmokeC = 0, csmoke = 0; + int cblobV = 0, cblobC = 0, cblob = 0; + int cblurV = 0, cblurC = 0, cblur = 0; + int cglowV = 0, cglowC = 0, cglow = 0; + int cflatV = 0, cflatC = 0, cflat = 0; + int caddV = 0, caddC = 0, cadd = 0; + int clineV = 0, clineC = 0, cline = 0; + GLuint origBlendSrc, origBlendDst; + + glGetIntegerv(GL_BLEND_SRC, &origBlendSrc); + glGetIntegerv(GL_BLEND_DST, &origBlendDst); + //Render to the particle FBO + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, partsFbo); +#else + if (GRID_MODE)//draws the grid + { + for (ny=0; ny<YRES; ny++) + for (nx=0; nx<XRES; nx++) + { + if (ny%(4*GRID_MODE)==0) + blendpixel(vid, nx, ny, 100, 100, 100, 80); + if (nx%(4*GRID_MODE)==0) + blendpixel(vid, nx, ny, 100, 100, 100, 80); + } + } #endif for(i = 0; i<=parts_lastActiveIndex; i++) { if (parts[i].type) { |
