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

Method GetPerObjectData

trinity/Tr2PrimitiveSet.cpp:87–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87Tr2PerObjectData* Tr2PrimitiveSet::GetPerObjectData( ITriRenderBatchAccumulator* accumulator )
88{
89 Tr2PerObjectDataStandard* data = accumulator->Allocate<Tr2PerObjectDataStandard>();
90
91 if( !data )
92 {
93 return nullptr;
94 }
95
96 PerObjectPSData perObjectPSBuffer;
97 PerObjectVSData perObjectVSBuffer;
98
99 // column_major for shaders
100 perObjectVSBuffer.WorldMat = Transpose( m_worldTransform );
101 perObjectPSBuffer.WorldMat = Transpose( m_worldTransform );
102
103 data->CopyToVSFloatBuffer( perObjectVSBuffer );
104 data->CopyToPSFloatBuffer( perObjectPSBuffer );
105
106 return data;
107}
108
109void Tr2PrimitiveSet::UpdateTransform( void )
110{

Callers

nothing calls this directly

Calls 3

TransposeFunction · 0.85
CopyToVSFloatBufferMethod · 0.80
CopyToPSFloatBufferMethod · 0.80

Tested by

no test coverage detected