Optimizing Particles With VBO

I wanted to optimize the way I render particles for an object and also make it have the right dimensions. This was very important to achieve since I will have to do a lot of collision detection later on. I used a VBO to associate one particle-object with a set of particles so that they can be drawn quickly. I spent 24 hours locating a bug that was because I had some deletions in a destructor, which got called automatically in C++ when I copied over an object into an array. One reason for this taking a long time to discover was that there are so many other possible things that can go wrong in OpenGL. I checked the shader code, the initialization for the VBOs and if how I rendered particles on to the screen was wrong. In the end it was neither of these but just a simple destructor error. Here are some cool videos of how the particles looks like for a fox object:



Kommentarer

Populära inlägg i den här bloggen

Collisions

Particle Generation