Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] OpenGL painting inside QML
QtWS25 Last Chance

[SOLVED] OpenGL painting inside QML

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 931 Views
  • 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.
  • strahlexS Offline
    strahlexS Offline
    strahlex
    wrote on last edited by
    #1

    Hello,

    I want to create a OpenGL item that is painted under OpenGL like this one: http://qt-project.org/doc/qt-5/qtquick-scenegraph-openglunderqml-example.html but the item described in the tutorial is painted on the whole window. Is there are way to paint only a specific area of the window (meaning the area of the actual item)?

    I tried glScissors but it did not work as exspected.

    Feel free to check out my website machinekoder.com
    and my pet projects Intellicute and QtQuickVcp

    1 Reply Last reply
    0
    • strahlexS Offline
      strahlexS Offline
      strahlex
      wrote on last edited by
      #2

      I solved it by using a QQuickPaintedItem and implementing my OpenGL calls between painter->beginNativePainting() and painter->endNativePainting() in the paint function.
      I had to use a YIntertedFrameBuffer as render target of the QQuickPaintedItem

      Feel free to check out my website machinekoder.com
      and my pet projects Intellicute and QtQuickVcp

      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