I think I can show you better than I can tell you
This is the first major milestone in my journey! I’ve got a lot of work to do before this is in any usable condition for artists, but none the less it feels good to see my OpenCL Particle System and interact with it through the Blender Game Engine. Right now I’ve linked to my EnjaParticles library from Blender, I create a system using a custom modifier (called Enja for now) on an object and if the modifier is present I divert rendering of that object to a custom function.
My next step is to get a better understanding of all the OpenGL magic going on because my colors and alpha blending are not behaving as expected. At the same time I’m thinking I’ll rewrite the particle system code inside the BGE and start looking at how the existing particle system works. I’m going to start with a small subset of the existing functionality, so please let me know if you’re dying to have a certain particle effect in the game engine so I can prioritize better, otherwise I’ll just do what looks the most fun.
I want to spend some more time thinking about handling the OpenCL context, perhaps loading it, building the programs and preparing the kernels when the game engine starts. Right now an entirely new context is created for each system which seems quite wasteful. I also need to clean up the build process, which should be helped by moving the code internal to blender, but making OpenCL available to the whole of blender might encourage other developers to try their hand at accelerating other areas.