Fixed Camera::_viewProjectionUpdated state (#16405)

Camera::_viewProjectionUpdated is not initialised in constructor. Should be initialised to false.
This can lead to redundant visibility checks if _viewProjectionUpdated happens to resolve true.

As Camera::visit() is never called, _viewProjectionUpdated is never actually updated, resulting in no visibility tests when the camera transform changes.

Fixes #16404
This commit is contained in:
Aaron 2016-08-24 11:15:19 +01:00 committed by minggo
parent a9a8add717
commit e62af99db7
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,7 @@ Camera::Camera()
, _viewProjectionDirty(true)
, _cameraFlag(1)
, _frustumDirty(true)
, _viewProjectionUpdated(false)
, _depth(-1)
, _fbo(nullptr)
{
@ -441,6 +442,7 @@ void Camera::setFrameBufferObject(experimental::FrameBuffer *fbo)
void Camera::apply()
{
_viewProjectionUpdated = _transformUpdated;
applyFrameBufferObject();
applyViewport();
}