README.md

September 30, 2019 ยท View on GitHub

:warning:These are not valid glTF models as primitive restart values are disallowed.
See the glTF specification for more details.

These models are intended to test behavior of primitive restart feature of graphics APIs.

Each asset features a mesh consisting of two primitives with geometry data organized like this (example for TRIANGLES with UNSIGNED_SHORT).

Vertex Buffer

v0 (lower-right)
v1 (upper-left)
v2...v65533 (0, 0, 0)
v65534 (lower-left)
v65535 (lower-left, same as previous)

Index Buffer:

  • Left primitive: 0, 1, 65535
  • Right primitive: 0, 1, 65534

If the left primitive is rendered, the graphics API doesn't perform primitive restart for a giver primitive type and/or index buffer type.

Note, that some engines may rebuild index buffers into different data types on load which may lead to different results.

The following table shows the properties that are set for a given model.

ModeIndices Component TypeLeft Primitive IndicesRight Primitive Indices
00
View
PointsUnsigned Byte[0, 1, 255][0, 1, 254]
01
View
PointsUnsigned Short[0, 1, 65535][0, 1, 65534]
02
View
LinesUnsigned Byte[0, 1, 1, 255, 255, 0][0, 1, 1, 254, 254, 0]
03
View
LinesUnsigned Short[0, 1, 1, 65535, 65535, 0][0, 1, 1, 65534, 65534, 0]
04
View
Line LoopUnsigned Byte[0, 1, 255][0, 1, 254]
05
View
Line LoopUnsigned Short[0, 1, 65535][0, 1, 65534]
06
View
Line StripUnsigned Byte[0, 1, 255, 0][0, 1, 254, 0]
07
View
Line StripUnsigned Short[0, 1, 65535, 0][0, 1, 65534, 0]
08
View
TrianglesUnsigned Byte[0, 1, 255][0, 1, 254]
09
View
TrianglesUnsigned Short[0, 1, 65535][0, 1, 65534]
10
View
Triangle StripUnsigned Byte[0, 1, 255][0, 1, 254]
11
View
Triangle StripUnsigned Short[0, 1, 65535][0, 1, 65534]
12
View
Triangle FanUnsigned Byte[0, 1, 255][0, 1, 254]
13
View
Triangle FanUnsigned Short[0, 1, 65535][0, 1, 65534]