| 182 | } |
| 183 | |
| 184 | void Tr2PrimitiveScene::SetupPerFrameData( Tr2RenderContext& renderContext ) |
| 185 | { |
| 186 | PerFrameVSData data; |
| 187 | |
| 188 | // 0 |
| 189 | memset( &data, 0, sizeof( PerFrameVSData ) ); |
| 190 | |
| 191 | // column_major for shaders |
| 192 | data.ViewMat = XMMatrixTranspose( Tr2Renderer::GetViewTransform() ); |
| 193 | |
| 194 | Matrix proj = Tr2Renderer::GetReversedDepthProjectionTransform(); |
| 195 | |
| 196 | data.ProjectionMat = XMMatrixTranspose( proj ); |
| 197 | data.ViewProjectionMat = XMMatrixTranspose( |
| 198 | XMMatrixMultiply( Tr2Renderer::GetViewTransform(), proj ) ); |
| 199 | |
| 200 | FillAndSetConstants( m_vertexConstants, data, Tr2RenderContextEnum::VERTEX_SHADER, Tr2Renderer::GetPerFrameVSStartRegister(), renderContext ); |
| 201 | } |
| 202 | |
| 203 | void Tr2PrimitiveScene::SetPerFrameDataForPicking( Tr2RenderContext& renderContext ) |
| 204 | { |
nothing calls this directly
no test coverage detected