![]() |
Xors3d Engine
|
Functions | |
PSystem * | xCreatePSystem (bool pointSprites=false) |
Creates a new particle system and returns its handle. | |
int | xPSystemGetBlend (PSystem *psystem) |
Returns the blending mode of a particle system. See 'Blending modes' for more information. | |
int | xPSystemGetMaxParticles (PSystem *psystem) |
Returns the maximum number of particles in a particle system. | |
void | xPSystemSetBlend (PSystem *psystem, int mode) |
Sets the blending mode of a particle system. | |
void | xPSystemSetMaxParticles (PSystem *psystem, int maxNumber) |
Sets the maximum number of particles in a particle system. | |
int | xPSystemType (PSystem *psystem) |
Returns a type of particles used in specified particle system. |
PSystem* xCreatePSystem | ( | bool | pointSprites = false | ) |
Creates a new particle system and returns its handle.
Particle system is a special entity which unifies emitters and particles. The number of emitters and particles in a particle system is arbitrary. The optional pointSprites parameter allows you to choose the type of particles: point sprites or traditional quads. Point sprites offer a nice advantage over the normal method of rendering particles. Normally you would create a rectangle using four view-aligned vertices set to the appropriate texture coordinates. With point sprites you can simply use one vertex for every particle! Therefore they require less bandwidth, so you can render more particles using point sprites instead of using the old method, and you don't have to manually adjust the vertices to be aligned with the view vector. However, some features of point sprites (e.g. scaling) are not supported on older video cards available.
pointSprites | True to use point sprites, false to use quads. |
int xPSystemType | ( | PSystem * | psystem | ) |
Returns a type of particles used in specified particle system.
If returned value is true point sprites are used. If returned value is false quads are used.
psystem | A particle system to verify. |
void xPSystemSetBlend | ( | PSystem * | psystem, |
int | mode | ||
) |
Sets the blending mode of a particle system.
psystem | Particle system handle. |
mode | Blend mode. See 'Blending modes' for more information. |
int xPSystemGetBlend | ( | PSystem * | psystem | ) |
Returns the blending mode of a particle system. See 'Blending modes' for more information.
psystem | Particle system handle. |
void xPSystemSetMaxParticles | ( | PSystem * | psystem, |
int | maxNumber | ||
) |
Sets the maximum number of particles in a particle system.
The number of particles in a particle system will never exceed a given value.
psystem | Particle system handle. |
maxNumber | The maximum number of particles. |
int xPSystemGetMaxParticles | ( | PSystem * | psystem | ) |
Returns the maximum number of particles in a particle system.
The number of particles in a particle system will never exceed a given value.
psystem | Particle system handle. |