So, I’ve built my first particle system using point sprites in OpenGL. The process wasn’t terribly difficult although I did find a few design flaws with my implementation. I’ve heard a quote saying you don’t truly understand the problem until you implement the solution, and I definitely believe that to be the case here. I don’t think this is a bad effort given it’s my first (and done in a few hours nonetheless), but I definitely think I can make a lot of improvements here. This version is very inefficient. The vertices are stored in a Vertex Buffer Object (located on the video cards memory), and my code updates the VBO every iteration of the code. I lose some speed here by having to send vertices to the VBO during every iteration when I could use a vertex shader program to instruct the GPU to change the vertices and use glTransformFeedback to write the information back to the VBO. My justification for not doing it this time is that this particle system was actually a class assignment, and I only did what was required by the assignment specification.
This is my first system. A flaw in my logic made the particles flow in an unintended way, but I decided that I actually liked the effect and decided to keep that first recording.
I call this one “the Dorrito.”
I’ll definitely be writing a new one to try to apply what I’ve learned while using a vertex shader. I’ll probably release the code for that effort on the Depth Charge Gaming site (once I get it online.)
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.