Mercurial > hg > forks > gldragon
diff dmmodel.h @ 36:d640f2a34031
Only scale/translate/rotate the model if those attributes have been set in the scenefile.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 01 Dec 2019 23:12:04 +0200 |
parents | 1215fdd0a8ab |
children | 73a785323e8a |
line wrap: on
line diff
--- a/dmmodel.h Tue Nov 26 07:22:35 2019 +0200 +++ b/dmmodel.h Sun Dec 01 23:12:04 2019 +0200 @@ -143,6 +143,7 @@ DMVector4 ambient, diffuse, specular; int shininess; DMVector3 translate, scale, rotate; + bool translateSet, scaleSet, rotateSet; unsigned int id_prog, id_fs, id_vs; @@ -172,7 +173,8 @@ translate.x = translate.y = translate.z = 0; rotate.x = rotate.y = rotate.z = 0; - scale.x = scale.y = scale.z = 1; + scale.x = scale.y = scale.z = 0; + translateSet = rotateSet = scaleSet = false; specular.p.x = specular.p.y = specular.p.z = 0.8f; specular.p.w = 1.0f; shininess = 96;