Render to multiple textures

Started by
1 comment, last by MARS_999 15 years, 3 months ago
Hello! Im new to opengl but not to 3d rendering concepts. Im using opengl 2.0 + GLSL to render some stuff. I want to render to one or more off screen surfaces, possibly of different pixel formats. Can i do this in standard ogl2.0 or do i have to use some extensions? If so, which one? I know this is fairly standard functionality in graphics cards newer than geforce 6000/radeon 9000 series, and ive used this in directX, but now i want to do it in opengl too. Any links or google keywords are greatly appreciated. Also, id like to use floating point textures, like 4 * 32bit float pixel format. What extensions do i need for that? //Emil
Emil Jonssonvild
Advertisement
ARB_draw_buffers
I think its become part of the opengl core
YOu need to setup a FBO with however many textures you want to write to, just a heads up I am not sure but 4 may be the max on older cards...

Anyway, you setup the FBO and assign the textures as attachments to the FBO. Then you output the data in the FS to gl_FragData[n] n = 0-max texture limits.

Here is a good tutorial.


http://www.gamedev.net/reference/articles/article2333.asp

This topic is closed to new replies.

Advertisement