Inertia's picture

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Just commited an updated version to SVN.

Inertia's picture

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

the Fiddler's picture

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