mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +00:00
Validate near and far clip distances
This commit is contained in:
parent
9f26d6023b
commit
17c1053777
@ -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…
x
Reference in New Issue
Block a user