Camera uses now OGL projection matrices with OpenGL driver.

Fixes wrong near-plane values with OpenGL (showed too much before).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5772 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2019-02-21 18:20:33 +00:00
parent 0a2ee246c3
commit 7ebd410e0a
1 changed files with 2 additions and 1 deletions

View File

@ -230,7 +230,8 @@ void CCameraSceneNode::setFOV(f32 f)
void CCameraSceneNode::recalculateProjectionMatrix()
{
ViewArea.getTransform ( video::ETS_PROJECTION ).buildProjectionMatrixPerspectiveFovLH(Fovy, Aspect, ZNear, ZFar);
video::E_DRIVER_TYPE driverType = SceneManager->getVideoDriver()->getDriverType();
ViewArea.getTransform ( video::ETS_PROJECTION ).buildProjectionMatrixPerspectiveFovLH(Fovy, Aspect, ZNear, ZFar, driverType != video::EDT_OPENGL);
IsOrthogonal = false;
}