MrDatabase
MrDatabase

Reputation: 44505

Clearing/releasing OpenGL ES buffers

I'm creating an extra framebuffer and renderbuffer for offscreen rendering in my OpenGL ES 1.1 iOS app. When I render into the additional renderbuffer I start to see memory warnings in the XCode console. What is the proper way to "release", "clear" etc these additional buffers?

I experimented with glClear(GL_COLOR_BUFFER_BIT) but the memory warnings continued. Commenting out the rendering code causes the warnings to go away.

Upvotes: 2

Views: 3236

Answers (1)

Christian Rau
Christian Rau

Reputation: 45968

I don't know what you mean, glClear clears the content of the buffer (color, depth, stencil, whatever, depending on the bit flags) to a specific value. If you want to delete the buffers and free their resources, once you're finished with them, use glDeleteFramebuffers and glDeleteRenderbuffers respectively, maybe with some OES suffix.

Othwerwise I don't know what you're talking about else and if these two cases don't apply you should just ignore such stupid warnings.

Upvotes: 5

Related Questions