MCPcopy Create free account
hub / github.com/carbonengine/trinity / SetupPerFrameData

Method SetupPerFrameData

trinity/Tr2PrimitiveScene.cpp:184–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void 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
203void Tr2PrimitiveScene::SetPerFrameDataForPicking( Tr2RenderContext& renderContext )
204{

Callers

nothing calls this directly

Calls 2

GetViewTransformFunction · 0.85
FillAndSetConstantsFunction · 0.70

Tested by

no test coverage detected