Refactored the DrawElements function to use indexCount instead of vertexCount for drawing operations. This change ensures that the correct number of indices is used for indexed drawing, which aligns with the intended usage of DrawElements. Using vertexCount was causing incorrect rendering results due to mismatched element counts.
Refactored the DrawElements function to use indexCount instead of vertexCount for drawing operations. This change ensures that the correct number of indices is used for indexed drawing, which aligns with the intended usage of DrawElements. Using vertexCount was causing incorrect rendering results due to mismatched element counts.