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

Method UpdateData

trinity/Tr2DirectInstanceData.cpp:211–221  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Unmaps the vertex buffer that was mapped for writing, making data available to the GPU, with an early exit if buffer is invalid. Should be called after data is modified. --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

209// with an early exit if buffer is invalid. Should be called after data is modified.
210// --------------------------------------------------------------------------------------
211void Tr2DirectInstanceData::UpdateData()
212{
213 CCP_STATS_ZONE( __FUNCTION__ );
214 if( !m_vertexBuffer.IsValid() )
215 {
216 return;
217 }
218
219 USE_MAIN_THREAD_RENDER_CONTEXT();
220 m_vertexBuffer.UnmapForWriting( renderContext );
221}
222
223// --------------------------------------------------------------------------------------
224// Description:

Callers 3

RebuildMethod · 0.45
CreateInstancedMeshMethod · 0.45
UpdateInstanceDataMethod · 0.45

Calls 2

IsValidMethod · 0.45
UnmapForWritingMethod · 0.45

Tested by

no test coverage detected