MipMaps regeneration when using Render to Target through FBOs?

Assuming mipmapping is desirable:

I call glGenerateMipmapEXT (GL_TEXTURE_2D); when I first set out a rendering target for my FBO. Do I have to repeat this again when I have completed the rendering in order to correctly fill all the mipmapping levels or to perform subsequent visualizations of the visualizations to all levels at the same time?

I have an example where one of my objects fades to <0,0,0,0> when the min filter (GL_LINEAR_MIPMAP_LINEAR) is triggered, and I assume that not re-mipmapping after rendering causes this.

I looked through a few examples and found a couple where subsequent calls to glGenerateMipmap are made, but more where they are missing.

opinions?

+3
source share
1 answer

glGenerateMipmapwill populate levels [1, .., n] based on level [0]. So yes, you should call it whenever your level [0] changes.

+6
source

All Articles