Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.2, 5.14.1
-
None
-
Ubuntu 18.04 (Intel® UHD Graphics 630), Windows 10 (Intel® UHD Graphics 630)
-
-
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 |
391777,8 | Fix indices alignment problem | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |