开发者

Problem using FBO: Only first pass renders. A possible problem at setting render target back?

开发者 https://www.devze.com 2022-12-13 22:37 出处:网络
I have a huge problem with using FBO. I have a multi-pass display using FBOs and multitexturing. Everything seems to work fine until the end of first execution of display.

I have a huge problem with using FBO.

I have a multi-pass display using FBOs and multitexturing. Everything seems to work fine until the end of first execution of display.

I set the render target back to screen using glBindFrameBufferEXT(GL_FRAMEBUFFER_EXT, 0) at the end of my display function but the passes after that do n开发者_如何学运维ot take effect. The screen seems to freeze..

What might be the cause? Any guesses?


I suggest you add the

glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT);

before binding the FBO, and

glPopAttrib();

after you release it.

0

精彩评论

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