- scale the vertex coordinates that get output to the hardware by 1024.

This is needed to get a coordinate system that is compatible with GZDoom's so that its lighting code can be reused more easily.
This commit is contained in:
Christoph Oelckers 2020-06-01 09:55:28 +02:00
parent 68c97e3c25
commit 350acd2ac3
6 changed files with 15 additions and 12 deletions

View file

@ -1645,7 +1645,9 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
int prevClamp = GLInterface.GetClamp();
GLInterface.SetClamp(0);
auto matrixindex = GLInterface.SetIdentityMatrix(Matrix_Model);
VSMatrix imat = 0;
imat.scale(1024, 1024, 1024);
auto matrixindex = GLInterface.SetMatrix(Matrix_Model, &imat);
for (surfi=0; surfi<m->head.numsurfs; surfi++)
{
@ -1700,7 +1702,8 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
//Let OpenGL (and perhaps hardware :) handle the matrix rotation
mat[3] = mat[7] = mat[11] = 0.f; mat[15] = 1.f;
GLInterface.SetMatrix(Matrix_Model, mat);
for (int i = 0; i < 15; i++) mat[i] *= 1024.f;
GLInterface.SetMatrix(Matrix_Model, mat);
// PLAG: End
bool exact = false;