MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / _convertProjectionMatrix

Method _convertProjectionMatrix

OgreMain/src/OgreRenderSystem.cpp:1033–1053  ·  view source on GitHub ↗

-----------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1031 }
1032 //-----------------------------------------------------------------------
1033 void RenderSystem::_convertProjectionMatrix( const Matrix4 &matrix, Matrix4 &dest )
1034 {
1035 dest = matrix;
1036
1037 if( !mReverseDepth )
1038 {
1039 // Convert depth range from [-1,+1] to [0,1]
1040 dest[2][0] = ( dest[2][0] + dest[3][0] ) / 2;
1041 dest[2][1] = ( dest[2][1] + dest[3][1] ) / 2;
1042 dest[2][2] = ( dest[2][2] + dest[3][2] ) / 2;
1043 dest[2][3] = ( dest[2][3] + dest[3][3] ) / 2;
1044 }
1045 else
1046 {
1047 // Convert depth range from [-1,+1] to [1,0]
1048 dest[2][0] = ( -dest[2][0] + dest[3][0] ) / 2;
1049 dest[2][1] = ( -dest[2][1] + dest[3][1] ) / 2;
1050 dest[2][2] = ( -dest[2][2] + dest[3][2] ) / 2;
1051 dest[2][3] = ( -dest[2][3] + dest[3][3] ) / 2;
1052 }
1053 }
1054 //-----------------------------------------------------------------------
1055 void RenderSystem::_convertOpenVrProjectionMatrix( const Matrix4 &matrix, Matrix4 &dest )
1056 {

Callers 4

preparePassHashMethod · 0.45
updateFrustumImplMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected