-
Win32 Windowing & GL performance
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
this?
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.
Hmmmmmmmmmmmmmmm??????
-
Advanced Member
Frequent Contributor
Re: Win32 Windowing & GL performance
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.
-
Re: Win32 Windowing & GL performance
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules