Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-5872

OpenGL context created without depth-buffer on Linux

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: R2014a
    • Fix Version/s: R2017a
    • Component/s: GUI
    • Labels:
      None
    • Environment:

      GMAT R2015a; CentOS 7.2.1511; Gallium LLVMpipe renderer; see attached files for detail.

      Description

      In release R2015a, the ViewCanvas constructor uses the wxGLCanvas constructor without explicitly asking for any depth buffer precision. This can result in a GL context created with no depth buffer. In this case, then, the OrbitView rendering is incorrect because there is no depth sorting or testing.

      Attached are screenshots demonstrating the issue and a simple patch to fix it. The patch changes the GmatGLCanvasAttribs array, adding in a pair of values specifying a WX_GL_DEPTH_SIZE of 16 to request a depth buffer explicitly. This results in the correct behavior, at least on the GL stack I am using.

        Gliffy Diagrams

          Attachments

          1. after.png
            after.png
            352 kB
          2. before.png
            before.png
            343 kB
          3. depthpatch.diff
            1 kB
          4. glxinfo.out
            32 kB

            Activity

            Hide
            djcinsb Darrel Conway added a comment -

            Nice catch! I tend to run with the nvidia drivers installed on Linux, and this defect doesn't show up there.

            Show
            djcinsb Darrel Conway added a comment - Nice catch! I tend to run with the nvidia drivers installed on Linux, and this defect doesn't show up there.
            Hide
            tgrubb Thomas Grubb added a comment -

            Status 2016-10-21 - No work performed.

            Show
            tgrubb Thomas Grubb added a comment - Status 2016-10-21 - No work performed.
            Hide
            tgrubb Thomas Grubb added a comment -

            Fix put in dev branch, 2016-10-25

            Show
            tgrubb Thomas Grubb added a comment - Fix put in dev branch, 2016-10-25
            Hide
            djcinsb Darrel Conway added a comment -

            Yep, that fixed it. Thanks, Bryan!

            Show
            djcinsb Darrel Conway added a comment - Yep, that fixed it. Thanks, Bryan!
            Hide
            djcinsb Darrel Conway added a comment - - edited

            Looks good (checked on a machine with a low end video card and default Nouveau drivers)

            Show
            djcinsb Darrel Conway added a comment - - edited Looks good (checked on a machine with a low end video card and default Nouveau drivers)
            Hide
            djcinsb Darrel Conway added a comment -

            Cleaning up last comment

            Show
            djcinsb Darrel Conway added a comment - Cleaning up last comment

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified