开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜