summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/ps/particle_system.cpp
diff options
context:
space:
mode:
author Julian Sikorski <belegdol+github@gmail.com>2023-09-05 17:10:24 +0200
committer GitHub <noreply@github.com>2023-09-06 01:10:24 +1000
commit1c61ccfe840cdae7a9f92292946a45f3b47e2412 (patch)
treeb56d4b69b96e314abcf56407da44705a602727f1 /3rdparty/bgfx/examples/common/ps/particle_system.cpp
parentb2c399c61d65063ae95e8387d34b098e9516b1a9 (diff)
Updated bgfx, bx and bimg to current upstream versions. (#11493)
* Reverted "macOS, iOS: Removed OpenGL/OpenGLES support. (commit 4693983242a698eaafed87faf4ffef1789adc8f9). * Reverted "Fix macOS build" (commit ce2c2c13eda7d699051f75f598e740a447343a88). * Reverted "macOS: Fixed deprecated warnings." (commit 10a8cb61f882ebc9bb376ee2341d003880b7037f). * Added bgfx/README.mame explaining deviations from upstream.
Diffstat (limited to '3rdparty/bgfx/examples/common/ps/particle_system.cpp')
-rw-r--r--3rdparty/bgfx/examples/common/ps/particle_system.cpp22
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 721779f1123..1939bdfd8f2 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-2022 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2023 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::init::None);
+ bx::Vec3 pos(bx::InitNone);
switch (m_shape)
{
default:
@@ -281,7 +281,7 @@ namespace ps
break;
}
- bx::Vec3 dir(bx::init::None);
+ bx::Vec3 dir(bx::InitNone);
switch (m_direction)
{
default:
@@ -331,8 +331,8 @@ namespace ps
bx::Aabb aabb =
{
- { bx::kInfinity, bx::kInfinity, bx::kInfinity },
- { -bx::kInfinity, -bx::kInfinity, -bx::kInfinity },
+ { bx::kFloatInfinity, bx::kFloatInfinity, bx::kFloatInfinity },
+ { -bx::kFloatInfinity, -bx::kFloatInfinity, -bx::kFloatInfinity },
};
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;
}