MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / initParticles

Function initParticles

cpp/5_Domain_Specific/smokeParticles/particleDemo.cpp:157–168  ·  view source on GitHub ↗

initialize particle system

Source from the content-addressed store, hash-verified

155
156// initialize particle system
157void initParticles(int numParticles, bool bUseVBO, bool bUseGL)
158{
159 psystem = new ParticleSystem(numParticles, bUseVBO, bUseGL);
160 psystem->reset(ParticleSystem::CONFIG_RANDOM);
161
162 if (bUseVBO) {
163 renderer = new SmokeRenderer(numParticles);
164 renderer->setLightTarget(vec3f(0.0, 1.0, 0.0));
165
166 sdkCreateTimer(&timer);
167 }
168}
169
170void cleanup()
171{

Callers 1

mainFunction · 0.70

Calls 3

sdkCreateTimerFunction · 0.85
setLightTargetMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected