View Full Version : Win32 Windowing & GL performance

02-09-2000, 12:27 AM
Hello everyone,

A question on whether it is better to have
a full screen GL app or a windowed GL app,
(win98 os).

I noticed last night my windowed app would
lose 20 fps and remain stable at the new fps
_after_ I had moved the window. That is, I
would have kept the original xtra 20 fps if
I had not moved the window at all. Why is

There is no varying logic or gl code in my
app. Everything is at a constant. The only
thing I guess is Win98 is doing something
xtra after I'd move the window.

02-09-2000, 12:52 AM
Weird. The only think that springs to mind would be an alignment issue - in its original position the window was on a 32/64/128 bit boundary (whatever bus width your gfx card uses), and in its new position it wasn't. Screen access can be significantly faster when windows are aligned on a "natural" boundary; IIRC there's a flag you can specify when creating a window that'll force this.

02-14-2000, 02:51 AM
Right, it is an alignment effect. If a window's horizontal position is divisible by 8 (byte aligned), drawing performance will increase.
You can force a window to always snap to a byte-aligned position when you prepare its window-class using "RegisterClass". The function's one and only parameter is a pointer to a WNDCLASS struct which has a style attribute. Just "or" CS_BYTEALIGNCLIENT to it.
Hope it helped.