Question

I was wondering if I can deallocate the depth buffer in iPhone OpenGL ES to conserve memory? Or it stays until the application finishes?

I only need the depth testing in the beginning of the application.

Was it helpful?

Solution

You could create a new EAGLContext object and get rid of the old one. When you create the new one, you can set it up however you want.

OTHER TIPS

Yes, you can delete the depth buffer at any time. Your code is responsible for creating the depth renderbuffer and attaching it to the framebuffer (although this is probably done by some template code that you copied), so you can similarly detach and delete it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top