Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4363

QGLContext - expose AGLContext for advanced openGL operations on Mac

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • P2: Important
    • Some future release
    • 4.5.3
    • GUI: OpenGL
    • None
    • macOS

    Description

      If you look in the list there are a few references to how this would be handy for users.

      http://lists.trolltech.com/qt-interest/2008-10/thread00594-0.html
      " You might want to
      send a feature request to Qt support asking for member functions in
      QGLContext to get the native context handle and to create a QGLContext
      wrapper around a native context handle.
      "

      This older one also provides a workaround.
      http://lists.trolltech.com/qt-interest/2006-04/msg00313.html
      "
      I just hate tearing...

      On the Apple, this is what you want. Make sure the QGLContext is
      current before doing this.

      #ifdef _APPLE_
      AGLContext aglContext;
      aglContext = aglGetCurrentContext();
      GLint swapInt = 1;
      aglSetInteger(aglContext, AGL_SWAP_INTERVAL, &swapInt);
      #endif

      This does of course restrict your frame rate to the monitors refresh
      rate... (do other work on threads if that's a problem).
      But ah, it's just lovely to look at

      Oh, you'll need this include file too, and don't forget to add the
      AGL Framework:

      #include <AGL/agl.h>

      "

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes