Simple FBO render to texture
Posted Monday, 5 May, 2008 - 16:38 by Inertia in
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)
| Attachment | Size |
|---|---|
| Program.cs | 12.84 KB |




Comments
May 05
17:05:17Re: Simple FBO render to texture
posted by the FiddlerJust commited an updated version to SVN.
May 05
17:20:45Re: Simple FBO render to texture
posted by InertiaThanks, I'm aware it's not the best RTT application ever written, but it proves that the changes work.
May 05
18:05:08Re: Simple FBO render to texture
posted by the FiddlerAnd it's also good as an example. Judging from forum posts on Tao and elsewhere, many people encounter problems gettings FBOs to work.