Skip to content

Commit

Permalink
Fix #3678 (#3689)
Browse files Browse the repository at this point in the history
  • Loading branch information
StasJ authored Dec 3, 2024
1 parent e512763 commit 64be581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/vapor/ParticleRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class RENDER_API ParticleRenderer : public Renderer {
float value;
};

size_t _particlesCount;
size_t _particlesCount = 0;

unsigned int _VAO = 0;
unsigned int _VBO = 0;
Expand Down
4 changes: 2 additions & 2 deletions lib/render/ParticleRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ void ParticleRenderer::_generateTextureData(const Grid* grid, const std::vector<

if (showDir) {
SetupParticleDirectionGL(_VAO, _VBO, dynamicSize);
directionData.reserve(_particlesCount);
directionData.reserve(grid->GetDimensions()[0]/stride+1);
} else {
SetupParticlePointGL(_VAO, _VBO, dynamicSize);
pointData.reserve(_particlesCount);
pointData.reserve(grid->GetDimensions()[0]/stride+1);
}
assert(glIsVertexArray(_VAO) == GL_TRUE);
assert(glIsBuffer(_VBO) == GL_TRUE);
Expand Down

0 comments on commit 64be581

Please sign in to comment.