Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-06-18 03:25:20 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-06-18 03:25:20 +0400
commitdc8776cafb7dda6e77d4295f60a013b8598b7a4f (patch)
treeae8bfe3037832901e057bfda177d928031246f1a /source/gameengine/Converter/BL_BlenderDataConversion.cpp
parent8fd0b50602acc87ccc49279ceb0cf0978133e704 (diff)
Apricot Branch: GLSL
==================== * Added GLSL vertex color support in the game engine. * Added VCol Paint and VCol Light options.
Diffstat (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 3e7402046b0..3c76c63544b 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -315,7 +315,8 @@ BL_Material* ConvertMaterial(
MCol* mmcol,
int lightlayer,
Object* blenderobj,
- MTF_localLayer *layers)
+ MTF_localLayer *layers,
+ bool glslmat)
{
//this needs some type of manager
BL_Material *material = new BL_Material();
@@ -329,12 +330,13 @@ BL_Material* ConvertMaterial(
type = 1; // material color
material->IdMode = DEFAULT_BLENDER;
+ material->glslmat = glslmat;
// --------------------------------
if(validmat) {
// use vertex colors by explicitly setting
- if(mat->mode &MA_VERTEXCOLP)
+ if(mat->mode &MA_VERTEXCOLP || glslmat)
type = 0;
// use lighting?
@@ -901,8 +903,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools*
else
ma = give_current_material(blenderobj, 1);
- bl_mat = ConvertMaterial(mesh, ma, tface, tfaceName, mface, mmcol, lightlayer, blenderobj, layers);
- bl_mat->glslmat = converter->GetGLSLMaterials();
+ bl_mat = ConvertMaterial(mesh, ma, tface, tfaceName, mface, mmcol, lightlayer, blenderobj, layers, converter->GetGLSLMaterials());
// set the index were dealing with
bl_mat->material_index = (int)mface->mat_nr;