Setting up and using tripple buffer?

Hi

We have an app. where NVidias hardware occlusion is used. And we can know see that it might be wise to use tripple frame buffers instead of the double frame buffer schema to beet the latency of the HW Occlusion querries.

We have search here and there but how do we set it up and use it?

Is that an extension?

Please help us to find what we are looking for.

Lee Sandberg
AB Colorod Media

If you use wglSwapInternalEXT or how ever it was called exactly you force the driver to use a tripple buffer, so that you can get higher FPS rates than the Hz of your monitor is, but… I don’t think that this will help you in any way with the latency of your occlusion culling.

You should handle it like following:
-“order” results of occlusion queries from object 0 to object x
-doing any non graphical things (AI blabla)
-from object x downto 0 testing if the result is available, if not calculating the visibility in software. why you should work here exactly the other way round answer yourself .

I don’t think that you await of everyone to have a GeForce 3 or better… after all this extension on ATI cards not at least exists as far as I know, so… well. I personally count OcclusionQuery as possible speed increase. I simply send my requests and only if they’re available I make use of them. If not… well, then the GPU was too slow, but a little bit faster it was nevertheless, if at least some of them were done fast enough.

BlackJack

Originally posted by BlackJack:
[b]If you use wglSwapInternalEXT or how ever it was called exactly you force the driver to use a tripple buffer, so that you can get higher FPS rates than the Hz of your monitor is, but… I don’t think that this will help you in any way with the latency of your occlusion culling.

You should handle it like following:
-“order” results of occlusion queries from object 0 to object x
-doing any non graphical things (AI blabla)
-from object x downto 0 testing if the result is available, if not calculating the visibility in software. why you should work here exactly the other way round answer yourself .

I don’t think that you await of everyone to have a GeForce 3 or better… after all this extension on ATI cards not at least exists as far as I know, so… well. I personally count OcclusionQuery as possible speed increase. I simply send my requests and only if they’re available I make use of them. If not… well, then the GPU was too slow, but a little bit faster it was nevertheless, if at least some of them were done fast enough.

BlackJack[/b]

OK

I have a technical demo running of an graphics engine using only harwdare occlusion culling on a standard octree
with view frustrum culling.

We are pritty much stuck in the way is beeing rendered right know.

However in the edges the updating for oclussion testing is a bit late. You can see
this if you turn the camera very fast.

To get rid of this we want to render first pass in one frame (test occlusion) and then render the secound pass (if object visable and there is a secound pass) to the previous frame and then Swap buffers.

So that the hardware occlusion get some time to respond.

I think this is how it’s ment to be used the additional frame buffers.

Our stuff will work on Geforce3 and abouve (not MX) and ATI’s Radeon 8500 and abouve and I think PC10 from 3dlabs as well but I have yet to get this confurmed from 3dlabs.

The new Matrox card however doesn’t seam to support it yet and I think there is no plans to ever support HW Occlusion.

Any one knows differentlly please tell us.

And yes we are developing something usefull for the next 5 or 10 years. Anyway we need some thing simple and working, we can add software occlusion later if we have to.

Thanx
Lee Sandberg
AB Colorod Media

>>>If you use wglSwapInternalEXT or how ever it was called exactly you force the driver to use a tripple buffer, so that you can get higher FPS rates than the Hz of your monitor is, but…<<<

Where does it say that it forces the driver to use tripple buffering?

V-man

V-Man : What else should it use as new color destination buffer after the swap than a second backbuffer? Ok, it could trash the first back buffer, but that would lower the real FPS, because it couldn’t swap if you are still rendering, so I don’t think there’s any other … clean … way than a second backbuffer when VSynch is off.

Lee: Hm… you could use a PBuffer for this as well.

BlackJack

[This message has been edited by BlackJack (edited 07-29-2002).]

Originally posted by BlackJack:
V-Man : What else should it use as new color destination buffer after the swap than a second backbuffer? Ok, it could trash the first back buffer, but that would lower the real FPS, because it couldn’t swap if you are still rendering, so I don’t think there’s any other … clean … way than a second backbuffer when VSynch is off.
WGL_EXT_swap_interval is VSync

This is all good, but we need a tripple buffer that we can draw to back and the scounderay back buffer (3:rd buffer).
And how can we do this?

/Lee Sandberg

Originally posted by zeckensack:
[quote]Originally posted by BlackJack:
V-Man : What else should it use as new color destination buffer after the swap than a second backbuffer? Ok, it could trash the first back buffer, but that would lower the real FPS, because it couldn’t swap if you are still rendering, so I don’t think there’s any other … clean … way than a second backbuffer when VSynch is off.
WGL_EXT_swap_interval is VSync
[/QUOTE]

If I recall correctly, OpenGL doesn’t allow triple buffering. I don’t seem to recall any extension that allows triple buffering to work either.

Originally posted by Korval:
If I recall correctly, OpenGL doesn’t allow triple buffering. I don’t seem to recall any extension that allows triple buffering to work either.
Exactly.

I’d like to have it too. If you have good arguments in favor of adding it, you might want to read this thread of mine: http://www.opengl.org/discussion_boards/ubb/Forum7/HTML/000307.html

Originally posted by zeckensack:
[b]Originally posted by BlackJack:
WGL_EXT_swap_interval is VSync

They should have a simple enable/disable.

Aren’t there any cards that do tripple buffering behind the scene? I think some matrox cards had this by default but I cant say if it applied to gl as well.

V-man

[This message has been edited by V-man (edited 07-30-2002).]

A simple question: If you use glFinish instead of glFlush, doesn´t this come very close to V-Sync? I mean the function does not return until everything is drawn, as far as i know, so it has to be V-Sync.

Jan.

PS: I was always told tripple-buffering was not possible in gl. And i never found any extension, or so, with which you could do it, so i also think it is not possible.

Originally posted by Jan2000:
A simple question: If you use glFinish instead of glFlush, doesn´t this come very close to V-Sync? I mean the function does not return until everything is drawn, as far as i know, so it has to be V-Sync.
.

No, after glFinish you are guaranteed that the openGL commands all have finished and therefore the back-buffer is completely done. But not until you issue a SwapBuffers() will the back-buffer be swapped with/copied to the front-buffer.
The exact moment where SwapBuffers() will take place is influenced by the setting of vSync.

Jean-Marc