MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / needsBufferUpdate

Method needsBufferUpdate

Engine/source/ts/tsShape.cpp:291–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291bool TSShape::needsBufferUpdate()
292{
293 // No buffer? definitely need an update!
294 if (mVertexSize == 0 || mShapeVertexData.size == 0)
295 return true;
296
297 // Check if we have modified vertex data
298 for (Vector<TSMesh*>::iterator iter = meshes.begin(); iter != meshes.end(); iter++)
299 {
300 TSMesh *mesh = *iter;
301 if (!mesh ||
302 (mesh->getMeshType() != TSMesh::StandardMeshType &&
303 mesh->getMeshType() != TSMesh::SkinMeshType))
304 continue;
305
306 // NOTE: cant use mVertexData.isReady since that might not be init'd at this stage
307 if (mesh->mVertSize == 0)
308 return true;
309 }
310
311 return false;
312}
313
314TSMesh* TSShape::findMesh(const String& meshName)
315{

Callers

nothing calls this directly

Calls 3

getMeshTypeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected