PDA

View Full Version : Freeing up memory



macsam
05-15-2017, 08:15 AM
Hi,

I have used glvertex3f to store the vertices of a triangle. It has used up a lot of CPU memory. How can I delete that memory so that I can create another view using different data.

Thanking you in advance

MacSam

macsam
05-15-2017, 08:56 AM
Or can I delete it?

Dark Photon
05-16-2017, 07:02 AM
I have used glvertex3f to store the vertices of a triangle. It has used up a lot of CPU memory. How can I delete that memory so that I can create another view using different data.

You might post a little code to illustrate your use case.

In general, once you upload your vertices to the GPU and store them in a buffer object, you can just delete (or reuse) the CPU memory buffer in your application that previously contained them, if you have no further need for them on the CPU-side in the future.