fix msvc complaining

This commit is contained in:
Green Sky 2022-11-01 00:01:53 +01:00 committed by Erik Scholz
parent 2b6a6b3e0c
commit 8ace6e51f9

View File

@ -311,8 +311,8 @@ void LiteParticles2D::setParticleBufferSize(uint32_t new_buffer_size) {
} }
void LiteParticles2D::resetBuffers(void) { void LiteParticles2D::resetBuffers(void) {
const auto gl_buffer_type = GL_DYNAMIC_COPY;
auto reset_buffer_0 = [this](size_t i) { auto reset_buffer_0 = [this](size_t i) {
static const auto gl_buffer_type = GL_DYNAMIC_COPY;
auto* data = _particles_0_buffers[i]->map(_particle_buffer_size, gl_buffer_type); auto* data = _particles_0_buffers[i]->map(_particle_buffer_size, gl_buffer_type);
for (size_t x = 0; x < _particle_buffer_size; x++) { for (size_t x = 0; x < _particle_buffer_size; x++) {
data[x] = glm::vec4{ data[x] = glm::vec4{