MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / SetNumActive

Method SetNumActive

GTE/Graphics/Particles.cpp:79–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void Particles::SetNumActive(uint32_t numActive)
80{
81 uint32_t numParticles = static_cast<uint32_t>(mPositionSize.size());
82 if (numActive <= numParticles)
83 {
84 mNumActive = numActive;
85 }
86 else
87 {
88 mNumActive = numParticles;
89 }
90
91 mVBuffer->SetNumActiveElements(4 * mNumActive);
92 mIBuffer->SetNumActiveElements(6 * mNumActive);
93}
94
95void Particles::GenerateParticles(std::shared_ptr<Camera> const& camera)
96{

Callers

nothing calls this directly

Calls 1

SetNumActiveElementsMethod · 0.45

Tested by

no test coverage detected