Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Win32 Windowing & GL performance

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    uk
    Posts
    3

    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??????

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    562

    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.

  3. #3
    Intern Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    95

    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
  •