Results 1 to 5 of 5

Thread: MDI Views with OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Tolland, CT
    Posts
    3

    MDI Views with OpenGL

    I've seen this question asked a few times, but, with no definitive answer. Does anyone know how to manage OpenGL in an MDI application that has a dynamic splitter? I have it set up so that each view in the splitter has its own RC, and, I call wglMakeCurrent BEFORE drawing (in OnDraw). Yet, OpenGL does not always update the view(s). It appears to be tied to the view that is "active". Any ideas?

    TIA,
    MIKE

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    London UK
    Posts
    195

    Re: MDI Views with OpenGL

    I think that msdn is the only place to have information about stuff like that. A wild guess would be to have only one RC if that is possible.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Tolland, CT
    Posts
    3

    Re: MDI Views with OpenGL

    Thanks for the reply. I tried using one RC (in the CDocument class) with no luck. Each view will update only if it is the currently active view. Someone else suggested a separate display list for each view. I use a global display llist. Is this a problem?

  4. #4
    Senior Member Regular Contributor
    Join Date
    May 2001
    Location
    London UK
    Posts
    195

    Re: MDI Views with OpenGL

    I do not use it so I really do not know.
    I did a search for mdi in the forum : http://www.opengl.org/discussion_boa...ML/000827.html
    says that you can not share display lists across rendering contexts.

    I suggest that you do a better search in both forum and if no luck post in the advanced forum.

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    Tolland, CT
    Posts
    3

    Re: MDI Views with OpenGL

    Thanks to everyone who offered help. I have resolved this problem. The application is a COM based program. Within one of the interfaces that writes to the screen, the code was grabbing the "active" view. This was the only OpenGL view that was being updated. It made it appear that the rendering context was invalid, when, in fact the code was doing what it was told to do. To get around it, I moved the screen wriing code from the interface to the view. This resolved the problem.

Similar Threads

  1. OpenGL Multiple views?
    By opengllover in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-01-2003, 01:27 AM
  2. OpenGL and VC++ -> Switching Views
    By link19 in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 02-05-2001, 07:49 AM
  3. Multiple MFC views with OpenGL
    By vr in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-12-2001, 12:01 AM
  4. Switching between some OpenGL Views
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-05-2000, 02:13 AM
  5. OpenGL with multiple Views in an MDI App (MFC)
    By imported_kevin in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 06-02-2000, 02:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean