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. QOPenGLContext: how to create a context inside a QOpenGLWidget?
Forum Updated to NodeBB v4.3 + New Features

QOPenGLContext: how to create a context inside a QOpenGLWidget?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.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.
  • Lays147L Offline
    Lays147L Offline
    Lays147
    wrote on last edited by Lays147
    #1

    Can someone give me a example like: how to create a context inside a QOpenGLWidget?
    Because i need to use the function QOpenGLContext::swapbuffers. And i have a function that needs to draw some stuff in the screen, and i realize that i need to use that function. I dont find another way to do it. I read some examples like http://doc.qt.io/qt-5/qtgui-openglwindow-example.html but appears different working when aplied a QWindow.
    Thanks!

    Lays Rodrigues
    Newby on Qt - Learning always!
    Using QT 5.7
    ArchLinux

    1 Reply Last reply
    0
    • johngodJ Offline
      johngodJ Offline
      johngod
      wrote on last edited by
      #2

      That example is using QWindow, should not be used with widgets, but as a standalone window.

      Check this docs instead http://doc.qt.io/qt-5/qopenglwidget.html#details

      Lays147L 1 Reply Last reply
      0
      • johngodJ johngod

        That example is using QWindow, should not be used with widgets, but as a standalone window.

        Check this docs instead http://doc.qt.io/qt-5/qopenglwidget.html#details

        Lays147L Offline
        Lays147L Offline
        Lays147
        wrote on last edited by
        #3

        @johngod I already read all the documentation of qopenglwidget. But i need draw some stuff without call paintGL. And i cant find a way to do it.
        I'm lost. Any tips help me to find a way i will be graiteful.
        Att

        Lays Rodrigues
        Newby on Qt - Learning always!
        Using QT 5.7
        ArchLinux

        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