Fixed rendering camera not being applied
This commit is contained in:
parent
7cda1efa54
commit
a814a530de
1 changed files with 4 additions and 2 deletions
|
@ -86,6 +86,8 @@ void SoftwareRenderer::setScenery(Scenery* scenery)
|
||||||
|
|
||||||
void SoftwareRenderer::prepare()
|
void SoftwareRenderer::prepare()
|
||||||
{
|
{
|
||||||
|
scenery->getCamera()->copy(render_camera);
|
||||||
|
|
||||||
// Prepare sub renderers
|
// Prepare sub renderers
|
||||||
delete atmosphere_renderer;
|
delete atmosphere_renderer;
|
||||||
if (getScenery()->getAtmosphere()->model == AtmosphereDefinition::ATMOSPHERE_MODEL_BRUNETON)
|
if (getScenery()->getAtmosphere()->model == AtmosphereDefinition::ATMOSPHERE_MODEL_BRUNETON)
|
||||||
|
@ -169,14 +171,14 @@ void SoftwareRenderer::start(RenderArea::RenderParams params)
|
||||||
render_interrupt = 0;
|
render_interrupt = 0;
|
||||||
render_progress = 0.0;
|
render_progress = 0.0;
|
||||||
|
|
||||||
|
prepare();
|
||||||
|
|
||||||
render_camera->setRenderSize(render_width, render_height);
|
render_camera->setRenderSize(render_width, render_height);
|
||||||
|
|
||||||
render_area->setBackgroundColor(COLOR_BLACK);
|
render_area->setBackgroundColor(COLOR_BLACK);
|
||||||
render_area->setParams(params);
|
render_area->setParams(params);
|
||||||
render_area->clear();
|
render_area->clear();
|
||||||
|
|
||||||
prepare();
|
|
||||||
|
|
||||||
is_rendering = 1;
|
is_rendering = 1;
|
||||||
thread.start(this);
|
thread.start(this);
|
||||||
loops = 0;
|
loops = 0;
|
||||||
|
|
Loading…
Reference in a new issue