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 5 of 5

Thread: SwapBuffers or wglSwapBuffers?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    159

    SwapBuffers or wglSwapBuffers?

    This is a question I've been wondering for a while. Which of these functions is the correct one to use? The OpenGL FAQ says use SwapBuffers, but gDebugger by Graphics Remedy only allows you to use wglSwapBuffers as a frame terminator. Anyone know the difference?

  2. #2
    Guest

    Re: SwapBuffers or wglSwapBuffers?

    It's mentioned in the FAQ:
    http://www.opengl.org/resources/faq/.../mswindows.htm

    The wgl flavors are mainly for dynamic linking of the OpenGL procs, where there would otherwise be an ambiguity between GDI and OpenGL ICD procs with the same names. I imagine this factors into how that gDebuger does its stuff, but I don't know for sure.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    159

    Re: SwapBuffers or wglSwapBuffers?

    I guess thats the next question, I'm having trouble finding a on-point answer about what an ICD vs. a GDI is. I know it stands for 'installable client driver' and they were used when OpenGL was first getting started. But are the drivers we install nowadays with our video cards ICDs?

    I did find those answers in the FAQ but the article they link to at the bottom which is supposed to explain this in more detail is a dead link (http://www.hardwidge.org.uk/).
    I was worried the FAQ question was also out of date..

    Thanks

  4. #4
    Guest

    Re: SwapBuffers or wglSwapBuffers?

    Maybe you're thinking about MCDs (mini client drivers) used in the days of Quake1 and all that, that basically provided a minimal implementation of accelerated OpenGL. I don't hardly remember the details of it all, as it all sounded perfectly sinister at the time. But yes, ICDs are what we have today. GDI (graphics device interface) is just Windows way of doing drawing (pens, brushes, bitmaps, etc), and there is cooperation between GDI and the ICD, obviously, but the implementations are totally independent.

  5. #5
    Guest

    Re: SwapBuffers or wglSwapBuffers?

    To clarify that last point, the ICD can implement the 2D GDI, but GDI itself is a device interface provided by Windows. So since GDI and the ICD share function names like SwapBuffers, a wglSwapBuffers is needed to avoid ambiguity when loading the proc dynamically.

    And the MCD wasn't really sinister at all, but Microsoft sure thought so

    To be sure, I'm not really certain of the details, and in all likelihood they're all due to change in future operating systems and driver models. What about GDI+? Alas, who knows, and perhaps more importantly, who really cares? I keep meaning to grab a DDK, to get an inside look at this stuff, but I can never seem to drum up enough interest.

    Sorry I don't have a more definitive answer for you

Posting Permissions

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