ParticleContext_t P; void DoParticles() { P.Color(pVec(1,1,1)); P.Source(10, PDLine(pVec(0.0, 0.0, 0.401), pVec(0.0, 0.0, 0.405))); P.Move(); }For single-threaded apps, the main change is that you say
P.Action()
rather than pAction()
. This new structure is more thread-safe, more C++-esque and better performing when multithreaded.
This is the first major update to the particle system API in about five years. It includes enhancements in several areas. Here are the major improvements:
pSource(10, PDLine, 0.0, 0.0, 0.401, 0.0, 0.0, 0.405);becomes this:
pSource(10, PDLine(pVec(0.0, 0.0, 0.401), pVec(0.0, 0.0, 0.405)));This is much easier to read, safer, and now the Visual C++ editor can provide useful function prototype hints.