[Bf-blender-cvs] [82313b4] soc-2014-bge: Fix T33762 - texture fonts were not using the material color (gameengine)

HG1 noreply at git.blender.org
Fri Jun 20 17:53:24 CEST 2014


Commit: 82313b4fc4abed5646255cdc603015d55292f368
Author: HG1
Date:   Wed Jun 18 16:55:11 2014 +0100
https://developer.blender.org/rB82313b4fc4abed5646255cdc603015d55292f368

Fix T33762 - texture fonts were not using the material color (gameengine)

===================================================================

M	source/gameengine/Converter/BL_BlenderDataConversion.cpp
M	source/gameengine/Ketsji/BL_Material.cpp

===================================================================

diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index e511f01..1be94dc 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -889,10 +889,10 @@ static bool ConvertMaterial(
 	// swap the material color, so MCol on bitmap font works
 	if (validmat && (use_vcol == false) && (mat->game.flag & GEMAT_TEXT))
 	{
-		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->rgb[0] = KX_rgbaint2uint_new(rgb[0]);
+		material->rgb[1] = KX_rgbaint2uint_new(rgb[1]);
+		material->rgb[2] = KX_rgbaint2uint_new(rgb[2]);
+		material->rgb[3] = KX_rgbaint2uint_new(rgb[3]);
 	}
 
 	if (validmat)
diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp
index 006c1f7..849b5e0 100644
--- a/source/gameengine/Ketsji/BL_Material.cpp
+++ b/source/gameengine/Ketsji/BL_Material.cpp
@@ -47,10 +47,10 @@ BL_Material::BL_Material()
 
 void BL_Material::Initialize()
 {
-	rgb[0] = 0;
-	rgb[1] = 0;
-	rgb[2] = 0;
-	rgb[3] = 0;
+	rgb[0] = 0xFFFFFFFFL;
+	rgb[1] = 0xFFFFFFFFL;
+	rgb[2] = 0xFFFFFFFFL;
+	rgb[3] = 0xFFFFFFFFL;
 	IdMode = 0;
 	ras_mode = 0;
 	glslmat = 0;




More information about the Bf-blender-cvs mailing list