Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: OpenGL context

  1. #1
    Intern Contributor
    Join Date
    Jul 2004

    OpenGL context

    I need to be able to release objects (textures, display lists) from a different thread. Of course that doesn't work because the context is different in the thread outside the main one where the window was initialized. Unfortunately I don't understand what the context is, so I have some questions.

    Is it OS specific? I can find only wglMakeCurrent() command for windows. Since I'm using GLUT I don't know what HDC I'd pass to it. Is there a GLUT function that would make the context of my window current to some thread?

    I take it that if I make the context current, any other thread attempting to call any rendering functions will not work?


  2. #2
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001

    Re: OpenGL context

    A rendering context is an object that represents the OpenGL state. You can understand it as an instance of the GL state machine. In GLUT, context management is done behind the scenes and you can't access it. Still, your entire idea of making the context current to different threads is bad (for various reasons). Better way would be to send a message to the rendering (OpenGL) thread, telling which objects should be released.

Posting Permissions

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