I have an issue with the glDrawArrays() function in my program. When calling the function with arguments that specify a large number of indices the function consumes an enormous amount of RAM; worse, the amount is not fixed but simply increases very swiftly until it has consumed all free RAM on the system (on this particular system, 6 GiB) and then the program is killed by the OS.
My own first thought was that my program obviously had to have a memory leak, a huge one. However I couldn’t find one, and if I simply comment out the glDrawArrays() call, then the program uses almost no memory at all (in comparison) and it certainly doesn’t spiral out of control and crash like when I allow the glDrawArrays() call.
Furthermore I also learned that if I reduce the number of indices to be drawn in the call (e.g. to 1/4 the original number), then there is also no longer a problem.
By large, I mean that the issue manifests itself when the number of indices is (e.g.) ~ 33841152
However the problem doesn’t seem to occur when the number of indices is (e.g.) ~ 8500000.
If it is obvious what the problem is then I’d be very happy if someone could tell me what it is.
Thanks in advance!