How to render to texture with antialias?

I have the need to render 2D shapes on a texture (lets say offline buffer).
Are some forms of antialias available on render to texture techniques?
What could be the best solution? PBuffer, FBO or other? Is fsaa supported on those buffers?

Thanks in advance.
Turbo - www.amanith.org

AA on FBO is a very new extension:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_multisample.txt

IIRC multisample is available on pbuffers. An alternative is to render into your framebuffer (e.g. the backbuffer), and copy the antialiased result to a texture.

Yep, its a new extension, only available on Radeon X1800 level cards at the moment, as far as I know.

If you create a multisampled pbuffer though, you cant bind it to a texture. You’ll have to glCopyTexSubImage it from the pbuffer into a texture.

Also, I think no cards support multisampled floating point textures yet!

You will not get a clean copy of your multisampled framebuffer on NVidia cards using glCopyTexSubImage()…
This seems to be a bug. So, if you need the multisampled quality, glCopyTexSubImage() is not going to help.

You will not get a clean copy of your multisampled framebuffer on NVidia cards using glCopyTexSubImage()…
This seems to be a bug. So, if you need the multisampled quality, glCopyTexSubImage() is not going to help.
It’s working perfectly on a few different nvidia cards here. Sorry, def, I think your app has a bug, not nvidia.

To the original poster, just render your scene normally with antialiasing on and then use glCopyTexSubImage to grab it as a texture. glCopyTexSubImage is really fast these days.

Claytonious, if you are talking about Quadro cards, yes, supposedly the copy works flawlessly on those cards, but not on “game oriented” geforce cards.
If you have different experiences I would be very interested in hearing about them!
Thanks

Hi, Def. Yes, it is working fine on a Geforce 6600 and on a Geforce 5200, among some other nvidia cards (I don’t have specs on all of our beta testers, but at least a handful of them have “game class” nvidia cards).

And, of course, it’s working fine on the ATI cards, too.

Originally posted by Mikkel Gjoel:
[b]AA on FBO is a very new extension:
http://oss.sgi.com/projects/ogl-sample/registry/EXT/framebuffer_multisample.txt

IIRC multisample is available on pbuffers. An alternative is to render into your framebuffer (e.g. the backbuffer), and copy the antialiased result to a texture.[/b]
I think there is some issue of hw limit here but in principle, p-buffer render to texture (RTT) allows AA.
Old cards can’t do RTT AA.

You should be able to enable primitive AA.
glEnable(GL_LINE_SMOOTH) or
glEnable(GL_POINT_SMOOTH) or
glEnable(GL_POLYGON_SMOOTH)