Simple FBO render to texture

Seems the FrameBufferObject example is missing in 0.9.1 so here it is.

Program's operation:

  • Create an empty color and depth 2D texture.
  • Create a FBO, attach color and depth textures and and enable it.
  • Render some random triangles into the textures using the FBO.
  • Disable FBO. (end of initialization)
  • Each frame, draw the color and depth textures rendered earlier as quads on the screen. (color is left, depth is right)
AttachmentSize
Program.cs12.84 KB

Comments

Re: Simple FBO render to texture
posted by the Fiddler

Just commited an updated version to SVN.

Thanks, I'm aware it's not the best RTT application ever written, but it proves that the changes work.

Re: Simple FBO render to texture
posted by the Fiddler

And it's also good as an example. Judging from forum posts on Tao and elsewhere, many people encounter problems gettings FBOs to work.