mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-29 05:41:02 +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
391d001929
commit
8504b000bb
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…
Reference in a new issue