Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PySide OpenGL Contexts
Qt 6.11 is out! See what's new in the release blog

PySide OpenGL Contexts

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 288 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.
  • K Offline
    K Offline
    kgschlosser
    wrote last edited by
    #1

    OK so I have been running around in circles with the documentation trying to understand the whole context design. It's very confusing and everything I have tried either results in a black canvas or it crashes.

    This is what I am wanting to do.

    I have a 3D can like editor that is rendered using OpenGL. What is being rendered are 3D meshes and the meshes can be upwards of a million triangles or a mesh can be used in more than one location. I have shader code written that handles positioning, scaling and rotation of the meshes. That means the meshes are uploaded to the GPU's RAM and this is done a single time per mesh. I need to have another canvas that would be available on demand that is used for alignment of objects that connect to the mesh. Think part assemblies. I should be able to share contexts between the 2 canvases so I don't have to upload a second copy of the mesh to the GPU's RAM. I should be able to use the one that already exists in the RAM. This is where I am not having any luck. One location in the documentation mentions using AA_ShareOpenGLContexts but setting that doesn't work and results in the main canvas not rendering anything. There is also QOpenGLContext and in the documentation it shows there is a function named setShareContext but it needs to be passed a context that it is supposed to be sharing with but doesn't explain where to get that context from. there is also the function globalShareContext which is apart of that class as well but once again the description is rather vague as to what it's use would be.

    If someone could help me out with understanding the relationships of these things and how to get context staring working it would be appreciated.

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

      Hi,

      From old memories, you need to create the initial context first and then share it with the others and don't forget the creat calls.

      This Reddit thread might be what you are looking for.

      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