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

Replace the QMatrix4x4_Accessor hack in qsgbatchrenderer

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.0
    • 6.0
    • Qt RHI, Quick: SceneGraph
    • None
    • f02a6c040990e68d3fda1294499fcc956dfdd599 (qt/qtdeclarative/dev)

    Description

      qsgbatchrenderer.cpp comes with a QMatrix4x4_Accessor struct, which is then used with reinterpret_casts of QMatrix4x4:

      struct QMatrix4x4_Accessor
      {
          float m[4][4];
          int flagBits;
      
          static bool isTranslate(const QMatrix4x4 &m) { return ((const QMatrix4x4_Accessor &) m).flagBits <= 0x1; }
          static bool isScale(const QMatrix4x4 &m) { return ((const QMatrix4x4_Accessor &) m).flagBits <= 0x2; }
          static bool is2DSafe(const QMatrix4x4 &m) { return ((const QMatrix4x4_Accessor &) m).flagBits < 0x8; }
      };
      

      This is only there because QMatrix4x4::flagBits is private. Figure out an alternative, less hackish way to achieve the same.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lagocs Laszlo Agocs
              lagocs Laszlo Agocs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes