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

Qt Quick SceneGraph: Indices alignment problem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.9
    • 5.12.2, 5.14.1
    • Quick: SceneGraph
    • None
    • Ubuntu 18.04 (Intel® UHD Graphics 630), Windows 10 (Intel® UHD Graphics 630)
    • Linux/X11, Windows
    • 8fb6916ee4 (qt/tqtc-qtdeclarative/5.15)

    Description

      According to the official documentation, the QSGGeometry also allows to use not float types for GL-attributes: GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT and etc. But in some cases, the usage of these types leads to rendering errors: node not completely drawn. Show on a real example.

      In the above example, it is necessary to draw 3 triangles. Each vertex contains two coordinates (2 × GL_FLOAT) and a RGB-color (3 × GL_UNSIGNED_BYTE) that in total equals 11 bytes (structure must be packed). In most cases the default/batch [render|https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp] (OpenGL-implementation) uses one buffer for vertices and indices (as shown in the picture) that causes the item to not be drawn. Sometimes we also use the same buffer for vertices/indices. We came to the conclusion that in similar situations it is necessary to align the index part of buffer object (index-type alignment) for excluding described effect.

      Attachments

        For Gerrit Dashboard: QTBUG-83315
        # Subject Branch Project Status CR V

        Activity

          People

            hatemelkharashy Hatem ElKharashy
            amuralev Artem Muralev
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes