Better fire rendering for saves

This commit is contained in:
Simon Robertshaw 2012-09-14 23:53:58 +01:00
parent 5b9032fb3f
commit 3b2f4d59fc
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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;