trackgen: fix matrix warnings
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8410 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 4e22e81762691a04da0c2aa7c8a1c416f0b75988 Former-commit-id: e153564cd26f4ce06b662397e3c6497e6b22ed13
This commit is contained in:
parent
cc8e29992a
commit
ba46385619
1 changed files with 11 additions and 8 deletions
|
@ -109,16 +109,19 @@ ApplyTransform(sgMat4 m, ssgBase *node)
|
|||
}
|
||||
}
|
||||
|
||||
static void sgMakeScaleMat4(sgMat4 dst, const SGfloat scale)
|
||||
{
|
||||
sgSetVec4(dst[0], scale, SG_ZERO, SG_ZERO, SG_ZERO);
|
||||
sgSetVec4(dst[1], SG_ZERO, scale, SG_ZERO, SG_ZERO);
|
||||
sgSetVec4(dst[2], SG_ZERO, SG_ZERO, scale, SG_ZERO);
|
||||
sgSetVec4(dst[3], SG_ZERO, SG_ZERO, SG_ZERO, SG_ONE);
|
||||
}
|
||||
|
||||
static void scaleObject(ssgEntity *obj, tdble scale)
|
||||
{
|
||||
sgMat4 identMat;
|
||||
sgMat4 scaleMat;
|
||||
|
||||
sgMakeIdentMat4(identMat);
|
||||
sgMakeIdentMat4(scaleMat);
|
||||
|
||||
sgScaleMat4(scaleMat, identMat, scale);
|
||||
ApplyTransform(scaleMat, obj);
|
||||
sgMat4 m;
|
||||
sgMakeScaleMat4(m, scale);
|
||||
ApplyTransform(m, obj);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue