mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 22:23:52 +00:00
Merge branch 'dont-look-back-in-anger-or-look-backwards-at-all-really' into 'master'
Validate near and far clip distances See merge request OpenMW/openmw!2311 (cherry picked from commit510eac3fb4
)17c10537
Validate near and far clip distances
This commit is contained in:
parent
d88b34131a
commit
c4dd9d40fe
1 changed files with 5 additions and 0 deletions
|
@ -1275,6 +1275,11 @@ namespace MWRender
|
|||
|
||||
void RenderingManager::updateProjectionMatrix()
|
||||
{
|
||||
if (mNearClip < 0.0f)
|
||||
throw std::runtime_error("Near clip is less than zero");
|
||||
if (mViewDistance < mNearClip)
|
||||
throw std::runtime_error("Viewing distance is less than near clip");
|
||||
|
||||
double width = Settings::Manager::getInt("resolution x", "Video");
|
||||
double height = Settings::Manager::getInt("resolution y", "Video");
|
||||
|
||||
|
|
Loading…
Reference in a new issue