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,21 +112,23 @@ void OpenGLRenderer::setCamera(CameraDefinition *camera)
|
|||
{
|
||||
camera->copy(render_camera);
|
||||
getScenery()->keepCameraAboveGround(render_camera);
|
||||
render_camera->setRenderSize(vp_width, vp_height);
|
||||
cameraChangeEvent(render_camera);
|
||||
}
|
||||
|
||||
void OpenGLRenderer::resize(int width, int height)
|
||||
{
|
||||
if (ready)
|
||||
{
|
||||
vp_width = width;
|
||||
vp_height = height;
|
||||
|
||||
getScenery()->getCamera()->setRenderSize(width, height); // FIXME Should not be needed
|
||||
render_camera->setRenderSize(width, height);
|
||||
|
||||
cameraChangeEvent(render_camera);
|
||||
|
||||
prepareOpenGLState();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLRenderer::paint()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue