mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 20:45:34 +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
This commit is contained in:
commit
510eac3fb4
1 changed files with 5 additions and 0 deletions
|
@ -1276,6 +1276,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