render to texture

Started by
2 comments, last by helenj 18 years, 10 months ago
Hi, how can I render the result of vertex shader to a texture and process it in the pixel shader? Is there anything like SetRenderTarget() in D3D? Thanks a lot.
Advertisement
this has been answered alot in these forums, you should try the forum search (which is just a google search with a site qualitfier)

anyway, a few topics which i have posted into:
http://www.gamedev.net/community/forums/topic.asp?topic_id=321786&whichpage=1?
http://www.gamedev.net/community/forums/topic.asp?topic_id=320802&whichpage=1?

the quickest/easiest way is to use glCopyTexSubImage2D but that will incur a performance penalty. (implementation details are available in those threads)
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
Thanks a lot for your answer.

Actually I know glCopyTexSubImage2D can copy from the frame buffer to a texture.But there's one thing I'm not clear about. Does the output of vertex shader go to pixel shader and then been written into the frame buffer? So if I just want to render the output of vertex shader to texture, does glCopyTexSubImage2D still work?

I get the solution: use pbuffer.

Thanks all.

This topic is closed to new replies.

Advertisement