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

Method EveSOF

trinity/Eve/SpaceObjectFactory/EveSOF.cpp:110–153  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Initialize data members --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

108// Initialize data members
109// --------------------------------------------------------------------------------
110EveSOF::EveSOF( IRoot* lockobj ) :
111 PARENTLOCK( m_dataMgr ),
112 m_allowFileCaching( true ),
113 m_editorMode( false )
114{
115 // hard-coded names
116 m_depthOnlyEffectName = BlueSharedString( "depthonlyv5.fx" );
117 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_STANDARD] = BlueSharedString( "decalv5.fx" );
118 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_KILLCOUNTER] = BlueSharedString( "decalcounterv5.fx" );
119 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_HOLE] = BlueSharedString( "decalholev5.fx" );
120 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_CYLINDRICAL] = BlueSharedString( "decalcylindricv5.fx" );
121 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_GLOWCYLINDRICAL] = BlueSharedString( "decalglowcylindricv5.fx" );
122 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_GLOWSTANDARD] = BlueSharedString( "decalglowv5.fx" );
123 m_decalsEffectName[EveSOFDataHullDecalSetItem::USAGE_LOGO] = BlueSharedString( "decalv5.fx" );
124
125 // pre-register some really needed vars in the global variable store
126 Tr2Variable var1( "DepthMap", (ITr2TextureProvider*)nullptr );
127 Tr2Variable var2( "DepthMapMsaa", (ITr2TextureProvider*)nullptr );
128 GlobalStore().RegisterVariable( "BoneTransforms", &Tr2RingBuffer::GetInstance<Float4x3>() );
129 GlobalStore().RegisterVariable( "MorphTargetAnimations", &Tr2RingBuffer::GetInstance<Tr2MorphTargetAnimationData>() );
130
131 BlueSharedString gradientMap( "GradientMap" );
132
133 // some shared shaders here
134 m_spriteSetEffect.CreateInstance();
135 m_spriteSetEffect->StartUpdate();
136 m_spriteSetEffect->SetEffectPathName( "res:/graphics/effect/managed/space/spaceobject/fx/blinkinglightspool.fx" );
137 m_spriteSetEffect->EndUpdate();
138
139 m_hazeSetEffectSpherical.CreateInstance();
140 m_hazeSetEffectSpherical->StartUpdate();
141 m_hazeSetEffectSpherical->SetEffectPathName( "res:/graphics/effect/managed/space/spaceobject/fx/hazespherical.fx" );
142 m_hazeSetEffectSpherical->EndUpdate();
143
144 m_skinnedHazeSetEffectSpherical.CreateInstance();
145 m_skinnedHazeSetEffectSpherical->StartUpdate();
146 m_skinnedHazeSetEffectSpherical->SetEffectPathName( "res:/graphics/effect/managed/space/spaceobject/fx/skinned_hazespherical.fx" );
147 m_skinnedHazeSetEffectSpherical->EndUpdate();
148
149 m_hazeSetEffectHalfSpherical.CreateInstance();
150 m_hazeSetEffectHalfSpherical->StartUpdate();
151 m_hazeSetEffectHalfSpherical->SetEffectPathName( "res:/graphics/effect/managed/space/spaceobject/fx/hazehalfspherical.fx" );
152 m_hazeSetEffectHalfSpherical->EndUpdate();
153}
154
155// --------------------------------------------------------------------------------
156// Description:

Callers

nothing calls this directly

Calls 5

RegisterVariableMethod · 0.80
CreateInstanceMethod · 0.80
StartUpdateMethod · 0.80
SetEffectPathNameMethod · 0.80
EndUpdateMethod · 0.45

Tested by

no test coverage detected