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: OpenGL in a Windows MDI Child Window Splitter pane

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2000
    Location
    Wakefield, West Yorkshire, England
    Posts
    3

    OpenGL in a Windows MDI Child Window Splitter pane

    Has anyone got any sample code for initializing OpenGL in an MFC MDI forms child Window with a 4way splitter much like 3Ds max. Either that or does anyone have any other documentation on how to initialize OpenGL in the 4 different panes of the splitter window ?
    --------------------------------------------------
    Q3F Project founder and AI coder
    http://www.q3f.com
    --------------------------------------------------

  2. #2
    Junior Member Regular Contributor
    Join Date
    May 2000
    Location
    Batavia, NY, 14020
    Posts
    234

    Re: OpenGL in a Windows MDI Child Window Splitter pane

    Well, unless you're using seperate types of view classes for each pane (which you probably don't need to from what it sounds), you simply write into your view class the standard initialization routines to obtain the rendering context(s), etc. Everything should be local to the view.

    The only difference is that every time you want to draw to a view in an MDI-style environment, before you draw, be sure that the view calls wglMakeCurrent with its dc and rendering context to make the view the current renderer. Otherwise you render to an invalid context.

    Finally, remember, you cannot share display lists across rendering contexts, so if you use them, you have to have a display list for each context.

    Hope this helps.

    Siwko
    - I am not opensource! -

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2000
    Location
    Wakefield, West Yorkshire, England
    Posts
    3

    Re: OpenGL in a Windows MDI Child Window Splitter pane

    Thanks, I'll have to store my data another way if display lists can't be shared, no problem anyhow.

    [SW]Falcon
    --------------------------------------------------
    Q3F Project founder and AI coder
    http://www.q3f.com
    --------------------------------------------------

Posting Permissions

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