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

Method CopyValueToEffect

trinity/Shader/Parameter/Tr2FloatParameter.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void Tr2FloatParameter::CopyValueToEffect( Tr2RenderContextEnum::ShaderType inputType,
33 unsigned char* destHandle,
34 size_t size,
35 Tr2RenderContext& renderContext ) const
36{
37 // We need this to work even when the effect we're copying this to isn't the one that we're bound to
38 if( m_reroutedValue )
39 {
40 memcpy( destHandle, m_reroutedValue, size < sizeof( m_value ) ? size : sizeof( m_value ) );
41 }
42 else
43 {
44 memcpy( destHandle, &m_value, size < sizeof( m_value ) ? size : sizeof( m_value ) );
45 }
46}
47
48float Tr2FloatParameter::GetValue()
49{

Callers 2

UpdateConstantsMethod · 0.45
ApplyConstantBuffersMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected