MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setupSGData

Method setupSGData

Engine/source/renderInstance/renderBinManager.cpp:155–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155void RenderBinManager::setupSGData(MeshRenderInst *ri, SceneData &data)
156{
157 PROFILE_SCOPE( RenderBinManager_setupSGData );
158
159 // NOTE: We do not reset or clear the scene state
160 // here as the caller has initialized non-RI members
161 // himself and we must preserve them.
162 //
163 // It also saves a bunch of CPU as this is called for
164 // every MeshRenderInst in every pass.
165
166 dMemcpy( data.lights, ri->lights, sizeof( data.lights ) );
167 data.objTrans = ri->objectToWorld;
168 data.backBuffTex = ri->backBuffTex;
169 data.cubemap = ri->cubemap;
170 data.miscTex = ri->miscTex;
171 data.reflectTex = ri->reflectTex;
172 data.accuTex = ri->accuTex;
173 data.lightmap = ri->lightmap;
174 data.visibility = ri->visibility;
175 data.materialHint = ri->materialHint;
176 data.customShaderData.clear();
177 for (U32 i = 0; i < ri->mCustomShaderData.size(); i++)
178 {
179 data.customShaderData.push_back(&ri->mCustomShaderData[i]);
180 }
181}
182
183DefineEngineMethod( RenderBinManager, getBinType, const char*, (),,
184 "Returns the bin type string." )

Callers

nothing calls this directly

Calls 4

dMemcpyFunction · 0.50
clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected