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

Method OnPrepareResources

trinity/Tr2RingBuffer.cpp:143–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143bool Tr2RingBuffer::OnPrepareResources()
144{
145 if( !m_mirror.empty() && !m_buffer.IsValid() )
146 {
147 USE_MAIN_THREAD_RENDER_CONTEXT();
148 m_buffer.Create( m_stride, m_size, Tr2GpuUsage::SHADER_RESOURCE, Tr2CpuUsage::WRITE_OFTEN | Tr2CpuUsage::NON_SYNCRONIZED_WRITE, m_mirror.data(), renderContext );
149 m_buffer.SetName( m_name.c_str() );
150 }
151 return true;
152}
153
154
155

Callers

nothing calls this directly

Calls 4

emptyMethod · 0.80
IsValidMethod · 0.45
CreateMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected