2

Is it possible to attach a texture to an FBO which has mipmaps? I am currently trying to do this.I have a texture with several mipmap levels. I am attaching it to an FBO. When I clear the color for this buffer I still see the original texture in the output. Once I attach another texture with 1 mipmap level only the FBO draws the results correctly.

4

1 回答 1

3

尽管没有任何代码很难说出您的问题出在哪里,但快速而简单的答案就是:当然这是可能的!有没有想过level所有这些glFramebufferTexture函数的参数是什么?

但是您只能写入相应纹理的单个 mipmap 级别,所有其他级别都将保持不变。通常的方法是写入 mipmap 级别 0(就像您对非 mipmap 纹理所做的那样)并通过glGenerateMipmap. 但是您也可以单独写入任何其他级别或每个级别。

于 2013-08-01T15:51:37.487 回答