![]() |
Xors3d Engine
|
Functions | |
BBDECL PSystem *BBCALL | xCreatePSystem (bool pointSprites=false) |
Creates a new particle system and returns its handle. | |
BBDECL int BBCALL | xPSystemGetBlend (PSystem *psystem) |
Returns the blending mode of a particle system. See 'Blending modes' for more information. | |
BBDECL int BBCALL | xPSystemGetMaxParticles (PSystem *psystem) |
Returns the maximum number of particles in a particle system. | |
BBDECL void BBCALL | xPSystemSetBlend (PSystem *psystem, int mode) |
Sets the blending mode of a particle system. | |
BBDECL void BBCALL | xPSystemSetMaxParticles (PSystem *psystem, int maxNumber) |
Sets the maximum number of particles in a particle system. | |
BBDECL int BBCALL | xPSystemType (PSystem *psystem) |
Returns a type of particles used in specified particle system. |
BBDECL PSystem* BBCALL 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. |
BBDECL int BBCALL 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. |
BBDECL void BBCALL 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. |
BBDECL int BBCALL xPSystemGetBlend | ( | PSystem * | psystem | ) |
Returns the blending mode of a particle system. See 'Blending modes' for more information.
psystem | Particle system handle. |
BBDECL void BBCALL 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. |
BBDECL int BBCALL 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. |