When I draw custom geometry with more than 50k triangle in single batch anything drawn after that is not displaying. Is there a limit of the number of triangles per batch? My class inherits from Drawable and the geometry type is set to GEOM_STATIC.
Archive 19/01/2023.
Batch triangle limit
sabotage3d
1vanK
try enable
largeIndices
for IndexBuffer
sabotage3d
I just tried it but when enabled it didn’t display anything at all. Have anyone tried it before?
1vanK
Without code I can not guess
sabotage3d
This is the relevant part.
batches_[batchIndex_].geometryType_ = GEOM_TRAIL_FACE_CAMERA;
mask = MASK_POSITION | MASK_COLOR | MASK_TEXCOORD1 | MASK_TANGENT | MASK_OBJECTINDEX;
indexBuffer_->SetSize(numPoints_ - 1), true, false);
vertexBuffer_->SetSize(numPoints_, mask, true);
unsigned short* dest = (unsigned short*)indexBuffer_->Lock(0, numPoints_ - 1), true);
if (!dest)
return;
Lumak
greater than 64k indices
unsigned* dest = (unsigned*)indexBuffer_->Lock(0, numPoints_ - 1), true);
sabotage3d
Thank you. The combination of
largeIndices
with
unsigned
instead of
unsigned short
worked.