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. Sharing data between an offscreen QGLContext and a QGLWidget
Forum Updated to NodeBB v4.3 + New Features

Sharing data between an offscreen QGLContext and a QGLWidget

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

    I seem to be having a minor dilemma... It would seem that the ability to create offscreen QGLContexts has been deprecated:

    http://qt-project.org/doc/qt-4.8/qglcontext-obsolete.html

    You can no longer specify a paint device without using this obsolete constructor. It would seem that in the future, QGLContext will not be something you construct in your own code. However, if I don't construct my own QGLContext, I can't share with an offscreen QGLContext and an onscreen QGLWidget, as QGLWidget's constructor only accepts a share widget (QGLWidget) and the only way to specify a context to share with is via QGLWidget's setContext. There are so many different conflicting concepts that I am now dumbfounded and have absolutely no idea what I'm supposed to do. For the record, using the obsolete constructor works, and not specifying paint device leads to a create failure.

    Summary: I want to have an offscreen QGLContext to share data with my QGLWidget. What is the 'correct' and current way to do this?

    Thanks.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jchadwick
      wrote on last edited by
      #2

      Alright, since it seems to remain unknown the 'correct' way to do off-screen contexts now, I have just resolved to using QGLContext's deprecated functionality. I have also decided to drop QGLWidget and instead use QGLContext manually, using a regular QWidget as a paint device for on screen contexts, which solves the problems I was having.

      I will probably need completely different code in Qt 5, but for now this works. Any suggestions are still welcome.

      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