By Khaled1989
on Wed, 12/31/2014 - 14:03
I use tracking to target, so I draw dynamic image by openGl in renderFrame(), but that cuased huge memory leak.
I tried to create an if condition which occurs once and draw once, but clear buffers, colors ... etc (as I think) clear the draw.
So, Is there any way to draw once and keep this drawing till camera leave target then initiate all buffers, colors ... ?
Memory leak when draw Texture in renderFrame()
In OpenGL, you need to render your content at every frame; this does not mean however that you need to clear or rebuild your rendering data every frame; for example, if you have a 3d mesh (a vertex array) whose shape is not changing over time, you can create the vertex array just once e.g.
Memory leak when draw Texture in renderFrame()
Thank you AlessandroB, this explaination helped me to understand the openGl process.
I was actually re-create my dynamic image texture in renderFrame() (every frame), and when I changed that, memory became more good.
Thank you,
Memory leak when draw Texture in renderFrame()
Great ;-)