"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Memory leak when draw Texture in renderFrame()

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 ... ?

AlessandroB

Fri, 12/26/2014 - 08:31

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.

Khaled1989

Sun, 12/28/2014 - 13:14

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,