View Full Version : what happened when gl rendering window is hidden

12-27-2003, 09:59 AM
What happened when the gl rendering window is partialy covered?the gl rendering can work normally?

12-27-2003, 11:01 AM
The results are undefined, but more often than not only the visible portions will be rendered correctly. You cannot rely on the hidden parts being drawn.

12-27-2003, 09:46 PM
I found my ATI Radeon9800SE card can also render the portion being hidden,but the NVIDIA FX5200 and MX440 can not.But how about the NVIDIA Quadro and ATI FireGL card?Anyone can tell me the ability of these professional cards?

12-28-2003, 06:26 PM
What do you mean "can render"? Of course they CAN render; they can render to offscren pbuffers. The question is whether they DO render. Many drivers (including professional card drivers) allocate one back buffer for the entire display, so there aren't any bits for the hidden areas of windows; thus the drivers don't render there. That's often a performance win.

If you need to ensure that you get all the bits you render, when your window is not topmost, you need to use pbuffers.

12-28-2003, 06:53 PM
when an opengl window is hidden by another window and I use glCopyTexSubImage...() then the window which hides the openGL window gets captured to texture. you can achieve funny effects with this.

12-28-2003, 09:13 PM
pango, "professional cards" are no better at offscreen rendering. Infact it may be a useful optimization if you think about it. As jwatte says if you want offscreen rendering you can go the pbuffer route. This is the correct guaranteed way of rendering on all graphics cards where you find the extension.

[This message has been edited by dorbie (edited 12-28-2003).]

12-31-2003, 09:50 AM
To jwatte:
My previous reply means the ATI card DO the render when the window is hidden partially(is partially,not all).Because I found when the gl window is covered by another window,the ATI card can also render the whole window,but the NV card only render the visible portion.Is's a very interesting feature of Ati card,and it's very useful in my project,but the phenomenon is different with some documents said,so I post the topic just want to know:Is it true that the ATI card render the whole window while the window is hidden partially?

12-31-2003, 12:50 PM
Is it true that the ATI card render the whole window while the window is hidden partially?

The OpenGL spec says that an implementation is allowed to do whatever it wants. This could be rendering correctly, or putting garbage there. The only way to know is to test it, and it may change from driver release to driver release.

In short, don't rely on it.

01-02-2004, 09:44 AM
Personally this "Pixel Ownership behaviour" is perhaps the thing in OpenGL that bothers me the most.

For the longest time PBuffers weren't available or didn't function correctly on even NVIDIA or ATI cards. So the Pbuffer approach wasn't even a viable option.

Also for the majority of double buffered situations being able to rely on the backbuffer as a pristine copy, available to use for "expose events" is very handy.

I really don't see any major benefit in this "undefined behaviour", It's just yet another thing to code around.

To this day there are a lot of implementations on which there is still no good solution to this problem.

01-02-2004, 02:15 PM
I really don't see any major benefit in this "undefined behaviour", It's just yet another thing to code around.

You mean, besides saving video memory in windowed situations? By doing this, each RC doesn't need to have its own buffer; you can share buffers with everything else.

What would be nice is a platform-specific way, when you create your RC, to ask for either a shared or unique buffer.

01-03-2004, 09:01 AM
Your are right that you will save some memory. If your applications behaviour is to respond with a full redraw when expose events are encountered then It's more or less a non issue.

The problem is when that's not how your app is designed , under those circumstances, you have to keep your pristine copies somewhere, generally in a non power of two texture (only recently available in some implementations), created via the pbuffer and/or render to texture approaches. This also requires a pbuffer large enough to render the largest sized window,this in itself consumes memory, granted not so much as having all backbuffers maintained.

As you indicated it would be nice to request this functionality. As I stated before it has only been in recent times that PBuffer support was available/functional on some cards. To this day the large majority of Sun boxes I encounter support no PBuffers at all, leaving GLXPixmaps as your only "non hardware accelerated choice". Until 18 months ago even that approach was unavailable due to driver problems on some platforms.

I have also had less than reliable behaviour with GLXPbuffers on remote displays, even when both are identical nVidia boxes with identical drivers installed, never mind what happens between dis-similar platforms.

On Windows when using remote desktop, you are forced into the Microsoft driver path. No Pbuffers again. These x-platform issues go on and on.

I am a strong OpenGL advocate, but as soon as you enter the domain of crossplatform development you encounter way too many issues related to GLX/WGL etc...

I don't want to sound too negative, since things have improved quite a lot over the years. There are still however a lot of issues that need to be addressed to realize the true x-platform promise of OpenGL.


[This message has been edited by heath (edited 01-03-2004).]