diff options
author | 2017-03-29 17:09:40 +0200 | |
---|---|---|
committer | 2017-03-29 17:09:40 +0200 | |
commit | 49f7c99c7786ce257fae28dfeae2f8ee5810424c (patch) | |
tree | 1bbd30dd4dd48596186846c2fc77a8dc748215d2 /3rdparty/bgfx/examples/common/ps/particle_system.h | |
parent | 79f22e060b2c012d628d5d1d83288c1bb6e6acef (diff) |
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bgfx/examples/common/ps/particle_system.h')
-rw-r--r-- | 3rdparty/bgfx/examples/common/ps/particle_system.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/3rdparty/bgfx/examples/common/ps/particle_system.h b/3rdparty/bgfx/examples/common/ps/particle_system.h index be706582422..52b7b60e7fc 100644 --- a/3rdparty/bgfx/examples/common/ps/particle_system.h +++ b/3rdparty/bgfx/examples/common/ps/particle_system.h @@ -12,6 +12,15 @@ #include "../bounds.h" +struct EmitterHandle { uint16_t idx; }; +struct EmitterSpriteHandle { uint16_t idx; }; + +template<typename Ty> +inline bool isValid(Ty _handle) +{ + return _handle.idx != UINT16_MAX; +} + struct EmitterShape { enum Enum @@ -60,9 +69,9 @@ struct EmitterUniforms bx::Easing::Enum m_easeRgba; bx::Easing::Enum m_easeBlend; bx::Easing::Enum m_easeScale; -}; -struct EmitterHandle { uint16_t idx; }; + EmitterSpriteHandle m_handle; +}; /// void psInit(uint16_t _maxEmitters = 64, bx::AllocatorI* _allocator = NULL); @@ -71,6 +80,12 @@ void psInit(uint16_t _maxEmitters = 64, bx::AllocatorI* _allocator = NULL); void psShutdown(); /// +EmitterSpriteHandle psCreateSprite(uint16_t _width, uint16_t _height, const void* _data); + +/// +void psDestroy(EmitterSpriteHandle _handle); + +/// EmitterHandle psCreateEmitter(EmitterShape::Enum _shape, EmitterDirection::Enum _direction, uint32_t _maxParticles); /// |