diff options
author | 2023-09-08 05:14:35 +1000 | |
---|---|---|
committer | 2023-09-08 05:14:35 +1000 | |
commit | 44eb5ea3c69dcec37e2b687e479297af5303efc3 (patch) | |
tree | 2784753bdf56564ce3b4cf0f410bf07709854fdd /3rdparty/bgfx/examples/common/ps/particle_system.cpp | |
parent | 1147d8fc44c701ed0235e9374f97d218fae37b32 (diff) |
Revert "Updated bgfx, bx and bimg to current upstream versions. (#11493)"
This reverts commit 1c61ccfe840cdae7a9f92292946a45f3b47e2412.
Diffstat (limited to '3rdparty/bgfx/examples/common/ps/particle_system.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/ps/particle_system.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/3rdparty/bgfx/examples/common/ps/particle_system.cpp b/3rdparty/bgfx/examples/common/ps/particle_system.cpp index 1939bdfd8f2..721779f1123 100644 --- a/3rdparty/bgfx/examples/common/ps/particle_system.cpp +++ b/3rdparty/bgfx/examples/common/ps/particle_system.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2011-2023 Branimir Karadzic. All rights reserved. + * Copyright 2011-2022 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE */ @@ -248,7 +248,7 @@ namespace ps Particle& particle = m_particles[m_num]; m_num++; - bx::Vec3 pos(bx::InitNone); + bx::Vec3 pos(bx::init::None); switch (m_shape) { default: @@ -281,7 +281,7 @@ namespace ps break; } - bx::Vec3 dir(bx::InitNone); + bx::Vec3 dir(bx::init::None); switch (m_direction) { default: @@ -331,8 +331,8 @@ namespace ps bx::Aabb aabb = { - { bx::kFloatInfinity, bx::kFloatInfinity, bx::kFloatInfinity }, - { -bx::kFloatInfinity, -bx::kFloatInfinity, -bx::kFloatInfinity }, + { bx::kInfinity, bx::kInfinity, bx::kInfinity }, + { -bx::kInfinity, -bx::kInfinity, -bx::kInfinity }, }; for (uint32_t jj = 0, num = m_num, current = _first @@ -452,7 +452,7 @@ namespace ps } m_emitterAlloc = bx::createHandleAlloc(m_allocator, _maxEmitters); - m_emitter = (Emitter*)bx::alloc(m_allocator, sizeof(Emitter)*_maxEmitters); + m_emitter = (Emitter*)BX_ALLOC(m_allocator, sizeof(Emitter)*_maxEmitters); PosColorTexCoord0Vertex::init(); @@ -482,7 +482,7 @@ namespace ps bgfx::destroy(s_texColor); bx::destroyHandleAlloc(m_allocator, m_emitterAlloc); - bx::free(m_allocator, m_emitter); + BX_FREE(m_allocator, m_emitter); m_allocator = NULL; } @@ -554,7 +554,7 @@ namespace ps ); PosColorTexCoord0Vertex* vertices = (PosColorTexCoord0Vertex*)tvb.data; - ParticleSort* particleSort = (ParticleSort*)bx::alloc(m_allocator, max*sizeof(ParticleSort) ); + ParticleSort* particleSort = (ParticleSort*)BX_ALLOC(m_allocator, max*sizeof(ParticleSort) ); uint32_t pos = 0; for (uint16_t ii = 0, numEmitters = m_emitterAlloc->getNumHandles(); ii < numEmitters; ++ii) @@ -595,7 +595,7 @@ namespace ps index[5] = idx*4+0; } - bx::free(m_allocator, particleSort); + BX_FREE(m_allocator, particleSort); bgfx::setState(0 | BGFX_STATE_WRITE_RGB @@ -687,12 +687,12 @@ namespace ps m_shape = _shape; m_direction = _direction; m_max = _maxParticles; - m_particles = (Particle*)bx::alloc(s_ctx.m_allocator, m_max*sizeof(Particle) ); + m_particles = (Particle*)BX_ALLOC(s_ctx.m_allocator, m_max*sizeof(Particle) ); } void Emitter::destroy() { - bx::free(s_ctx.m_allocator, m_particles); + BX_FREE(s_ctx.m_allocator, m_particles); m_particles = NULL; } |