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. OpenGL initialization and rendering problem
Forum Updated to NodeBB v4.3 + New Features

OpenGL initialization and rendering problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 272 Views 2 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.
  • V Offline
    V Offline
    Vladimir Orlov
    wrote on last edited by
    #1

    Hi.

    I need to initialize 3rd-party library which does some OpenGL rendering. First it must init & load some resources, then the rendering happens. BUT the rendering isn't immediate. User must do some actions for it to happen.

    I tried to use precreated QOpenGLWidget, but its context is not initialized until the first draw request. So I can't initialize my library until I trigger QOpenGLWidget context creation (and I don't know any clean way to do that). It breaks all the architecture and user workflow.

    Then I tried to create QOpenGLContext manually, but it requires the surface to be made current and it can't be passed to QOpenGLWidget to be used / shared with it.

    So the question is what is the best approach to do offscreen initialization of OpenGL-based third-party library and render its output separately. Maybe load-time QOffscreenSurface + render-time QWidget will do the job but I don't like to reimplement all the QOpenGLWidget logic again if possible.

    Thanks in advance.

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

      Hi and welcome to devnet,

      What 3rd-party library is that ?

      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

      • Login

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