Fix T66372 Convert to mesh with subdivision breaks topology
This was caused by a check that was not taking the restart index into account.
This commit is contained in:
parent
b8ed75ab6d
commit
cc667854a9
Notes:
blender-bot
2023-02-14 07:39:44 +01:00
Referenced by issue #66372, Convert to mesh with subdivision breaks topology
|
@ -204,7 +204,7 @@ static void squeeze_indices_short(GPUIndexBufBuilder *builder,
|
|||
* converting in place to avoid extra allocation */
|
||||
GLushort *data = (GLushort *)builder->data;
|
||||
|
||||
if (max_index > 0xFFFF) {
|
||||
if (max_index >= 0xFFFF) {
|
||||
elem->base_index = min_index;
|
||||
for (uint i = 0; i < index_len; ++i) {
|
||||
data[i] = (values[i] == RESTART_INDEX) ? 0xFFFF : (GLushort)(values[i] - min_index);
|
||||
|
|
Loading…
Reference in New Issue