Thread: Device & Rendering Context

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    61

    Device & Rendering Context

    I'm making an app which opens multiple windows at the same time. In all windows I want to draw using openGL. This works mostly, but I don't understand a few things though. I've searched on the msdn, but I couldn't get a straight and understandable answer to my questions. So I hope someone here could help me.

    1) Do I have to make 1 rendering context for all windows ?
    2) Do I have to make 1 device context for all windows ?

    Or 1 DC and RC for each window ?

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    291
    I suppose that you will have different DC for each window (like in MDI), so while create the gl window you will have to use the hwnd from each window and assign 'GetDC(HWND );' to the 'HDC ' with wich you will 'ChoosePixelFormat', 'SetPixelFormat', 'wglCreateContext' and finally set the current render context 'wglMakeCurrent'.
    Niara

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Clearing the Windows Device Context
    By loopshot in forum Game Programming
    Replies: 8
    Last Post: 11-17-2005, 10:51 AM
  2. Device context woes
    By samGwilliam in forum Windows Programming
    Replies: 13
    Last Post: 04-16-2005, 10:01 PM
  3. Replies: 4
    Last Post: 06-30-2004, 03:11 PM
  4. Device Context
    By gvector1 in forum Windows Programming
    Replies: 2
    Last Post: 03-25-2003, 08:38 AM
  5. Replies: 1
    Last Post: 05-09-2002, 07:14 AM