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: Where's my window?

  1. #1
    Intern Contributor
    Join Date
    Oct 2001
    Location
    Fareham, England
    Posts
    72

    Where's my window?

    Hi,

    I have an MFC SDI application that has a couple or three OpenGL windows. On some platforms all windows display normally, on others only one GL window displays. Can someone tell me what I need to be looking at to work out what might be causing this?

    More info:
    1. I have once HGLRC and call wglmakeCurrent etc when I want to invalidate a different GL window.
    2. I use the CS_OWNDC window style
    3. I have an option to copy the window to the clipboard that uses glReadPixels(). When I paste the apparently blank window to MS Paint, lo and behold, the window appears as if it had displayed correctly.

    If anyone can give me a few useful pointers about how to trace the problem as to why not all of the GL windows display themselves on some platforms I would be very grateful.

    I'm guessing that this problem might be card related as some XP systems are fine while others have this problem. Win2k is also a target platform but not a priority.

    Many thanks

    Matthew

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,527

    Re: Where's my window?

    Yes, Microsoft's OpenGL implementation has problems rendering to child windows in SDI and MDI applications.
    Here are two documented bugs which sound exactly like what you got:
    http://support.microsoft.com/default...b;en-us;272222
    http://support.microsoft.com/default...b;en-us;278695

  3. #3
    Intern Contributor
    Join Date
    Oct 2001
    Location
    Fareham, England
    Posts
    72

    Re: Where's my window?

    There you go...thanks for that...

    I'm not sure that I want to render to a DIB section, seems slow, although some of the GL windows that exhibit this problem do not need to updated fast. It could work quite nicely.

    I render in immediate mode as the GL stuff is for visualising data from an acqisition system. It can run at 2KHz and I use buffering that luckily brings the refresh down to about 60Hz. I'm not confident that rendering to a DIB section will be fast enough. Does this not imply that a memory dc will be needed so it would be in software more anyway...?

    Perhaps I need an alternate scheme that renders to a DIB if hardware acceleration is not present. If that's the case I might as well switch to GDI for the whole thing.

    thanks

    matthew

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •