mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix blinking MD2 models
MD2 models are forced to load float frames, so mesh->indices is never loaded, so glDrawElements can't be used. Use glDrawArrays instead.
This commit is contained in:
parent
afb6bde061
commit
157cbe4b23
1 changed files with 3 additions and 1 deletions
|
|
@ -1894,7 +1894,9 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32
|
|||
pglNormalPointer(GL_FLOAT, sizeof(vbo64_t), BUFFER_OFFSET(sizeof(float) * 3));
|
||||
pglTexCoordPointer(2, GL_FLOAT, sizeof(vbo64_t), BUFFER_OFFSET(sizeof(float) * 6));
|
||||
|
||||
pglDrawElements(GL_TRIANGLES, mesh->numTriangles * 3, GL_UNSIGNED_SHORT, mesh->indices);
|
||||
pglDrawArrays(GL_TRIANGLES, 0, mesh->numTriangles * 3);
|
||||
// No tinyframes, no mesh indices
|
||||
//pglDrawElements(GL_TRIANGLES, mesh->numTriangles * 3, GL_UNSIGNED_SHORT, mesh->indices);
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue