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

Method SetDestination

trinity/Shader/Parameter/Tr2Vector4Parameter.cpp:261–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void Tr2Vector4Parameter::SetDestination( void* dest, size_t size )
262{
263 if( size >= sizeof( float ) * 4 && !m_isSrgb )
264 {
265 m_reroutedValue = (float*)dest;
266 m_reroutedValue[0] = m_value.x;
267 m_reroutedValue[1] = m_value.y;
268 m_reroutedValue[2] = m_value.z;
269 m_reroutedValue[3] = m_value.w;
270
271 for( BindingVector_t::iterator it = m_bindings.begin(); it != m_bindings.end(); ++it )
272 {
273 ( *it )->RerouteDestination( m_reroutedValue );
274 }
275 }
276 else
277 {
278 m_reroutedValue = NULL;
279
280 if( m_isSrgb )
281 {
282 m_linearValue = TriGammaToLinear( m_value );
283 }
284
285 for( BindingVector_t::iterator it = m_bindings.begin(); it != m_bindings.end(); ++it )
286 {
287 ( *it )->RerouteDestination( &m_value );
288 }
289 }
290}
291
292void Tr2Vector4Parameter::GetDestination( void*& dest, size_t& size )
293{

Callers

nothing calls this directly

Calls 4

TriGammaToLinearFunction · 0.85
RerouteDestinationMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected