Vista, DWM & swapbuffers

When calling swapbuffers from within a GL app, there is a hidden copy to a D3D surface controlled by DWM. However, does anyone know if ALL of a GL window is copied everytime, or just the part (current viewport) that is swapped?

Essentially, I’m creating my own UI using OpenGL - including text boxes, dropdowns, checkboxes etc, and was wondering which of the following is more efficient…

Say I have 3 text boxes in different locations on screen, and they all need updating. Would it be more effecient to update one, then swapbuffers. Repeat for each.

OR, would it be better to update all of them, and create essentially an invalid region encompassing all three, then swapping that region?

I suspect the latter, but there’s a distinct lack of documentation with respect to DWM & OpenGL windows.

Many thanks

I think WDM composition operates at the window level, and if so obviously any finer granularity of update within a window won’t make any difference.

It’s a bit of a pesky situation in WPF, since you don’t have access to window handles for embedded windows, only the top level ones, which forces you to use interop to make it all work (that’s for GL or DX, btw).

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.