*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
float deltaZ = far - near;
if ((near <= 0.0f) || (far <= 0.0f) || Equals(right, left) || Equals(bottom, top) || (deltaZ <= 0.0f))
{
float deltaZ = far - near;
if ((near <= 0.0f) || (far <= 0.0f) || Equals(right, left) || Equals(bottom, top) || (deltaZ <= 0.0f))
{
{
if ( Equals(right, left) || Equals(top, bottom) || Equals(far, near) )
{
{
if ( Equals(right, left) || Equals(top, bottom) || Equals(far, near) )
{
Camera::Camera()
: mUpdateViewFlag( UPDATE_COUNT ),
mUpdateProjectionFlag( UPDATE_COUNT ),
Camera::Camera()
: mUpdateViewFlag( UPDATE_COUNT ),
mUpdateProjectionFlag( UPDATE_COUNT ),
mType( DEFAULT_TYPE ),
mProjectionMode( DEFAULT_MODE ),
mInvertYAxis( DEFAULT_INVERT_Y_AXIS ),
mType( DEFAULT_TYPE ),
mProjectionMode( DEFAULT_MODE ),
mInvertYAxis( DEFAULT_INVERT_Y_AXIS ),
{
// If the visibility changes, the projection matrix needs to be re-calculated.
// It may happen the first time an actor is rendered it's rendered only once and becomes invisible,
{
// If the visibility changes, the projection matrix needs to be re-calculated.
// It may happen the first time an actor is rendered it's rendered only once and becomes invisible,
unsigned int projectionUpdateCount = UpdateProjection( updateBufferIndex );
// if model or view matrix changed we need to either recalculate the inverse VP or copy previous
unsigned int projectionUpdateCount = UpdateProjection( updateBufferIndex );
// if model or view matrix changed we need to either recalculate the inverse VP or copy previous