Fixed OpenGL rendering ratio being discarded on camera move
This commit is contained in:
parent
1077e4dca3
commit
98f0708d3e
1 changed files with 9 additions and 7 deletions
|
@ -112,20 +112,22 @@ void OpenGLRenderer::setCamera(CameraDefinition *camera)
|
||||||
{
|
{
|
||||||
camera->copy(render_camera);
|
camera->copy(render_camera);
|
||||||
getScenery()->keepCameraAboveGround(render_camera);
|
getScenery()->keepCameraAboveGround(render_camera);
|
||||||
|
render_camera->setRenderSize(vp_width, vp_height);
|
||||||
cameraChangeEvent(render_camera);
|
cameraChangeEvent(render_camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLRenderer::resize(int width, int height)
|
void OpenGLRenderer::resize(int width, int height)
|
||||||
{
|
{
|
||||||
vp_width = width;
|
if (ready)
|
||||||
vp_height = height;
|
{
|
||||||
|
vp_width = width;
|
||||||
|
vp_height = height;
|
||||||
|
|
||||||
getScenery()->getCamera()->setRenderSize(width, height); // FIXME Should not be needed
|
render_camera->setRenderSize(width, height);
|
||||||
render_camera->setRenderSize(width, height);
|
cameraChangeEvent(render_camera);
|
||||||
|
|
||||||
cameraChangeEvent(render_camera);
|
prepareOpenGLState();
|
||||||
|
}
|
||||||
prepareOpenGLState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLRenderer::paint()
|
void OpenGLRenderer::paint()
|
||||||
|
|
Loading…
Reference in a new issue