Fix SViewFrustum::setFrom for OGL projection matrices.
SViewFrustum::setFrom now sets the correct near clipping plane when the projection matrix doesn't use a target depth range of 0 to z, but for example -z to z. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5766 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
fc2e1bcfd7
commit
3283b96087
|
@ -1,5 +1,6 @@
|
|||
--------------------------
|
||||
Changes in 1.9 (not yet released)
|
||||
- SViewFrustum::setFrom now sets the correct near clipping plane when the projection matrix doesn't use a target depth range of 0 to z, but for example -z to z. So OGL projections matrices can now also use it.
|
||||
- Remove code to read boundingbox element in Collada reader as it's not in Collada specification.
|
||||
- .dae/Collade reader now converts from Collada's right-handed to Irrlicht's left handed coordinate system (switching z to -z)
|
||||
- Add irr::string::eraseTrailingFloatZeros to kick out trailing 0's for strings generated from floats.
|
||||
|
|
|
@ -323,10 +323,10 @@ namespace scene
|
|||
planes[VF_FAR_PLANE].D = mat[15] - mat[14];
|
||||
|
||||
// near clipping plane
|
||||
planes[VF_NEAR_PLANE].Normal.X = mat[2];
|
||||
planes[VF_NEAR_PLANE].Normal.Y = mat[6];
|
||||
planes[VF_NEAR_PLANE].Normal.Z = mat[10];
|
||||
planes[VF_NEAR_PLANE].D = mat[14];
|
||||
planes[VF_NEAR_PLANE].Normal.X = mat[3 ] + mat[2];
|
||||
planes[VF_NEAR_PLANE].Normal.Y = mat[7 ] + mat[6];
|
||||
planes[VF_NEAR_PLANE].Normal.Z = mat[11] + mat[10];
|
||||
planes[VF_NEAR_PLANE].D = mat[15] + mat[14];
|
||||
|
||||
// normalize normals
|
||||
u32 i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Tests finished. 1 test of 1 passed.
|
||||
Compiled as DEBUG
|
||||
Test suite pass at GMT Thu Jan 17 14:29:44 2019
|
||||
Test suite pass at GMT Thu Jan 31 18:56:28 2019
|
||||
|
||||
|
|
Loading…
Reference in New Issue