mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-30 16:34:30 +00:00
Tidying based on review
1.1 was changed to 1.f instead of 1.1f, so that's been fixed. Reduce the number of casts in RenderingManager::updateProjectionMatrix()
This commit is contained in:
parent
4eb69427dd
commit
f5889ba067
2 changed files with 5 additions and 5 deletions
|
|
@ -1361,10 +1361,10 @@ namespace MWRender
|
||||||
if (mViewDistance < mNearClip)
|
if (mViewDistance < mNearClip)
|
||||||
throw std::runtime_error("Viewing distance is less than near clip");
|
throw std::runtime_error("Viewing distance is less than near clip");
|
||||||
|
|
||||||
const double width = Settings::video().mResolutionX;
|
const int width = Settings::video().mResolutionX;
|
||||||
const double height = Settings::video().mResolutionY;
|
const int height = Settings::video().mResolutionY;
|
||||||
|
|
||||||
double aspect = (height == 0.0) ? 1.0 : width / height;
|
double aspect = (height == 0) ? 1.0 : static_cast<double>(width) / height;
|
||||||
float fov = mFieldOfView;
|
float fov = mFieldOfView;
|
||||||
if (mFieldOfViewOverridden)
|
if (mFieldOfViewOverridden)
|
||||||
fov = mFieldOfViewOverride;
|
fov = mFieldOfViewOverride;
|
||||||
|
|
@ -1389,7 +1389,7 @@ namespace MWRender
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mSharedUniformStateUpdater->setScreenRes(static_cast<float>(width), static_cast<float>(height));
|
setScreenRes(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since our fog is not radial yet, we should take FOV in account, otherwise terrain near viewing distance may
|
// Since our fog is not radial yet, we should take FOV in account, otherwise terrain near viewing distance may
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ namespace SceneUtil {
|
||||||
double _splitPointUniformLogRatio = 0.5;
|
double _splitPointUniformLogRatio = 0.5;
|
||||||
double _splitPointDeltaBias = 0.0;
|
double _splitPointDeltaBias = 0.0;
|
||||||
|
|
||||||
float _polygonOffsetFactor = 1.f;
|
float _polygonOffsetFactor = 1.1f;
|
||||||
float _polygonOffsetUnits = 4.0f;
|
float _polygonOffsetUnits = 4.0f;
|
||||||
|
|
||||||
bool _useFrontFaceCulling = true;
|
bool _useFrontFaceCulling = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue