diff options
author | Charlie Carley <snailrose@gmail.com> | 2007-02-05 08:48:09 +0300 |
---|---|---|
committer | Charlie Carley <snailrose@gmail.com> | 2007-02-05 08:48:09 +0300 |
commit | 2afea953e3cb45d521ac8cdd5be547087eda1ae6 (patch) | |
tree | 9633bb73f0fe289c53d80fc4e2ddf80e7ec921d7 /source/gameengine | |
parent | 41911da25880f01a9bd8a0ae05ca480cede8b1cb (diff) |
Bug fix for TF_BMFONT faces. Colors on the material were backwards when rendered.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index bca2213fd73..ea5638a6009 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -677,6 +677,16 @@ BL_Material* ConvertMaterial( unsigned int rgb[4]; GetRGB(type,mface,mmcol,mat,rgb[0],rgb[1],rgb[2], rgb[3]); + + // swap the material color, so MCol on TF_BMFONT works + if (validmat && type==1 && tface->mode & TF_BMFONT) + { + rgb[0] = KX_rgbaint2uint_new(rgb[0]); + rgb[1] = KX_rgbaint2uint_new(rgb[1]); + rgb[2] = KX_rgbaint2uint_new(rgb[2]); + rgb[3] = KX_rgbaint2uint_new(rgb[3]); + } + material->SetConversionRGB(rgb); material->SetConversionUV(uv); material->SetConversionUV2(uv2); |