简体   繁体   中英

OpenGL ES depth buffer

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM