From 3b2f4d59fc44ad4d15e002123aa1e05a080b51a8 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Fri, 14 Sep 2012 23:53:58 +0100 Subject: [PATCH] Better fire rendering for saves --- src/graphics/Renderer.cpp | 2 ++ src/simulation/SaveRenderer.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 70c82f487..ff9e1ea07 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -193,6 +193,8 @@ void Renderer::clearScreen(float alpha) #ifndef OGLR std::fill(vid, vid+(VIDXRES*VIDYRES), 0); #endif +#else + g->Clear(); #endif } #ifdef OGLR diff --git a/src/simulation/SaveRenderer.cpp b/src/simulation/SaveRenderer.cpp index 483172b33..3e5c971c4 100644 --- a/src/simulation/SaveRenderer.cpp +++ b/src/simulation/SaveRenderer.cpp @@ -66,8 +66,23 @@ Thumbnail * SaveRenderer::Render(GameSave * save, bool decorations) ren->clearScreen(1.0f); ren->ClearAccumulation(); + +#ifdef OGLR ren->RenderBegin(); ren->RenderEnd(); +#else + int frame = 15; + while(frame) + { + frame--; + ren->render_parts(); + ren->render_fire(); + ren->clearScreen(1.0f); + } + + ren->RenderBegin(); + ren->RenderEnd(); +#endif glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glTranslated(0, -MENUSIZE, 0); @@ -103,8 +118,19 @@ Thumbnail * SaveRenderer::Render(GameSave * save, bool decorations) pixel * src = g->vid; ren->ClearAccumulation(); + + int frame = 15; + while(frame) + { + frame--; + ren->render_parts(); + ren->render_fire(); + ren->clearScreen(1.0f); + } + ren->RenderBegin(); ren->RenderEnd(); + pData = (pixel *)malloc(PIXELSIZE * ((width*CELL)*(height*CELL))); dst = pData;