PDA

View Full Version : Problem about create a FSAA PBuffer



pango
12-16-2004, 12:14 AM
I found if I want to create a FSAA PBuffer,I must set the "WGL_DOUBLE_BUFFER_ARB" attribute

to GL_TRUE,if not set,the performance is dropped down.I also found the performance of the

front buffer of a FSAA PBuffer is very poor,in fact,I only can use the back buffer.So I rise

below questions:

-Why the FSAA PBuffer need Front/Back buffers?I don't want the double buffer,so can I get

front or back one rid of?

-Why the front buffer's performance is so poor?

My test platform is GeforceFX5900,66.93 driver,and my PBuffer has 16x FSAA.

dorbie
12-16-2004, 02:24 AM
FSAA is often done by supersampling the backbuffer and downsizing on a copy or other virtually equivalent means. Windows typically shows a simple contiguous memory image and swaps do a copy blit. So, to even support AA you need a backbuffer but it depends on hardware AFAIK.

In addition the windows frontbuffer may not be the best format or memory for drawing. Cards are optimized for rendering to the backbuffer.

If you want to render to the frontbuffer for specific reasons you have a lot of options depending on your larger objectives. You may keep a double buffer and copy back from the front each frame but there are also options to keep backbuffer contents on a swap when you have double buffering that may solve the kind of problem you think you need a single buffer for.

Sometimes what might seem like a great optimization just doesn't make sense when you consider how the hardware works. 3D hardware is specialized and does thing the right way for common 3D apps & games. You need to optimize with that in mind.

Relic
12-16-2004, 07:29 AM
I would agree with pango, P-buffers are always offscreen, there shouldn't be a difference between front and back buffer performance then. See if you can lay your hands on newer drivers.

pango
12-16-2004, 05:15 PM
Thanks Dorbie,the double buffered pbuffer is not I expected,because the front buffer will consume some video memory and my app always do not use it,so I want to create a FSAA PBuffer with only backbuffer,so how to do it?

pango
12-18-2004, 01:44 AM
Mm!No one can answer my question,Is it I had to waste some video memory for the front buffer that my program always do not use it?