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. QOpenGLWidget force initialisation
Forum Updated to NodeBB v4.3 + New Features

QOpenGLWidget force initialisation

Scheduled Pinned Locked Moved Unsolved General and Desktop
qopenglwidgetqtabwidget
2 Posts 2 Posters 1.0k 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.
  • S Offline
    S Offline
    sparis
    wrote on 24 Jun 2016, 19:38 last edited by
    #1

    Hi there,
    I am trying to setup 2 QOpenGLWidget as tabs in a QTabWidget.
    I need to perform initialisation in the GL widgets requiring the context at some point (shaders init).
    The problem is that the OpenGLWidget that is located in the visible tab is well initialised, but the other one not (certainly because it is not visible).
    What is the correct way to force the initialisation of this second GLWidget programmatically ?
    Thanks.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fidchells_Eye
      wrote on 24 Jun 2016, 19:56 last edited by
      #2

      You'll need to change the context to the second GL widgets before using it.
      As each time you render or do anything with OpenGL setup/parameters that you have the right context selected first for each widget.

      1 Reply Last reply
      0

      2/2

      24 Jun 2016, 19:56

      • Login

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