Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108050

Depth Buffer not working in 5.15.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.2.8, 6.5.1, 6.6.0
    • 5.15.2
    • GUI: OpenGL
    • None
    • Tests with openSUSE 15.3 and 15.4, using qmake and make to generate the executable.
      Processor 8xIntel Core i7-6700K cpu @ 4GHz
      Memory: 31.3GB
      Graphics Processor AMD CEDAR
      Graphics Platform X11
    • Linux/X11
    • 27ab0f012 (dev), 0fb68045e (6.5), 9126d9e5d (tqtc/lts-6.2)

    Description

      The web page "https//doc.qt.io/qt-6/supported-platforms.html" implies that Qt is supported by openSUSE 15.3 and 15.4.  As I am trying to port an OpenGL 2.1 code to Qt I've started with Qt5 that is available on both platforms.  I've tried out a number of tests all of which generated unexpected results - all of which could be explained if the depth buffer was not being used, despite any calls to enable and clear the buffer. 

      For this bug report I have gone back to the basic example program given in:
        https://doc.qt.io/qt-6/qtopengl-openglwindow-example.html

      The example is a bit of a cheat (bug?) in that it supposedly illustrates a moving 3D shape but does so without using a depth buffer and 'forgetting' to tell the reader of the missing buffer.

      However if I change routine TriangleWindow in main.cpp to add and clear the depth buffer and plot a second offset triangle, I find that the triangle that appears to be 'in front' is the one last plotted not the one that should be furthest from the eye.  The two snapshots included show cases where the second triangle should be nearest and furthest from the eye but in both cases it appears in front.

      I also enclose a copy of the modified main.cpp.

      Regards,  DJW

      p.s.  After failure with openSUSE 15.3, I upgraded to the latest stable version (15.4) but the results are the same in both cases.  In 15.4 the Qt version is 5.15.2

       

      Attachments

        1. InFront.png
          InFront.png
          67 kB
        2. main.cpp
          5 kB
        3. NotBehind.png
          NotBehind.png
          30 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            djw David Webb
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes