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. Possible to enable depth buffer for openGL painter?
Forum Updated to NodeBB v4.3 + New Features

Possible to enable depth buffer for openGL painter?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 447 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.
  • B Offline
    B Offline
    bobc
    wrote on last edited by
    #1

    I would like to be able to draw UI components at the beginning of a QOpenGLWidget scene and have it affect the depth buffer so fragment shader operations can be rejected under the UI components. I went through a bit of the source and if I'm getting it right the openGL paint engine disables the depth buffer but does use the stencil buffer. As is it appears it is meant to draw on top of what is already there.

    The only idea I have so far is if the stencil buffer is still intact after the 2d painting I could extract it and set the depth buffer as appropriate.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bobc
      wrote on last edited by
      #2

      I think the easiest way to do what I want is render it into an FBO texture and draw it on a quad. If i'm using opaque rectangles I could draw a blank quad before the 3d scene and let the 2d painter fill it in at the very end as well.

      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