开发者

Is regeneration of MipMaps when using Render to Target via FBOs required?

Assuming mipmapping is desirable:

I call glGenerateMipmapEXT(GL_TEXTURE_2D); when I first allocate the render target for my FBO. Do I have to call this again when I've completed rendering to it to correctly populate all the mipmapping levels, or do subsequent render calls render to all levels simultaneously?

I have an example where one of my object is fading to <0,0,0,0> whe开发者_如何学Gon the min filter (GL_LINEAR_MIPMAP_LINEAR) kicks in, and I'm assuming that not re-mipmapping after rendering is causing this.

I've looked through a few examples, and have found a couple where subsequent glGenerateMipmap calls are made, but more where they aren't.

Opinions?


glGenerateMipmap will fill levels [1,..,n] based on the level[0]. So yes, you should call it whenever your level[0] changes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜