Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Failed to Display with swapBuffers()
Qt 6.11 is out! See what's new in the release blog

Failed to Display with swapBuffers()

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 5.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    it says
    @
    QOpenGLContext::swapBuffers() called without corresponding makeCurrent()
    @

    I would like to know where to put the makeCurrent() function...

    Thank you very much.

    By the way, if you have idea about this:
    http://qt-project.org/forums/viewthread/26916/
    I will be very appreciated!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      generally, on the top of the function where you are doing some OpenGL stuff. Are you trying to do something outside paintGL ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Just before the swapBuffers() function

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          I have the same problem as ykmd and the replies so far haven't helped, unfortunately. I'd make a new thread but this one is not that old, so I think it appropriate to post in here.
          I have the makecurrent() at the beginning of paintGL() and the swapbuffers() call at the very end. However, I only get a flickering screen. That is, the screen in my GLWidget is all black and only goes to my set background color (a kind of light gray) while redrawing, for example if i resize the window.
          Does anyone know why that could be?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved