There are no clear invocations of the method, which is why I don’t know exactly what’s going on. I could do a lot of digging and find out where the issue is coming from, but I figured it’d be quicker to ask around the forum. I’ll run another test and check the time scale of the invocations though.
So, looking at it, it looks like it’s being called once per frame, which makes sense, since the data is changing on a frame by frame basis.
As is, I can get ~18000 individually drawn and collision checked bullets without dropping any frames anyway.
I think if anything, the slowdown past that point comes from poor handling of new objects.
Mostly I was just curious as to what was happening there. I figured based on the information I did have that it was just buffer allocation, but I haven’t used opengl in a very long time.
As for the amount of invocations to glbufferdata, that 2000~ was nothing compared to the ~1 million calls to a few other functions, luckily they’re incredibly cheap functions. (which I initially wanted to clean up for further optimization, but after profiling, clearly they aren’t an issue)
Basically, what I learned today is that buffers are expensive (no shit), what I’m doing is fine as long as I’m not throwing 20K+ bullets around, and collision is super cheap.