diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-01-15 14:34:55 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-01-15 14:34:55 +0300 |
commit | 6f3e5931052727358201e6648bd6011d99085414 (patch) | |
tree | b3893dc8bacb90a02dc9c9ed251b590a429496fe /source/gameengine/Converter/BL_BlenderDataConversion.cpp | |
parent | e35f73cd00f878706cd953fc3514e0b68b1b6f65 (diff) |
more graphics patches from Snailrose,
remove constraint fixed,
Bullet timestep now subdivides Blender game engine timestep, so it runs 60 hertz,
SphereShape reverted to old style, so no support for non-uniform scaled spheres for now,
Diffstat (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index a2801db7069..10d5e65ed9f 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -352,7 +352,7 @@ BL_Material* ConvertMaterial( Mesh* mesh, Material *mat, TFace* tface, MFace* material->flag[i] |= ( tface->transp &TF_ADD )?CALCALPHA:0; material->ras_mode|= ( tface->transp &(TF_ADD | TF_ALPHA))?TRANSP:0; material->mapping[i].mapping |= ( (material->img[i]->flag & IMA_REFLECT)!=0 )?USEREFL:0; - material->blend_mode[i] = BLEND_MUL; + //material->blend_mode[i] = BLEND_MUL; i++;// skip to the next image valid_index++; } @@ -371,12 +371,13 @@ BL_Material* ConvertMaterial( Mesh* mesh, Material *mat, TFace* tface, MFace* // ----------------------- if( mttmp->tex->imaflag &TEX_USEALPHA ) { material->flag[i] |= USEALPHA; - material->ras_mode |= TRANSP; } // ----------------------- else if( mttmp->tex->imaflag &TEX_CALCALPHA ) { material->flag[i] |= CALCALPHA; - material->ras_mode |= TRANSP; + } + else if(mttmp->tex->flag &TEX_NEGALPHA) { + material->flag[i] |= USENEGALPHA; } material->color_blend[i] = mttmp->colfac; @@ -845,8 +846,10 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools* // ----------------------------------- // pre calculate texture generation - for(int matid=0; matid<meshobj->NumMaterials(); matid++) - meshobj->GetMaterialBucket(matid)->GetPolyMaterial()->OnConstruction(); + for(RAS_MaterialBucket::Set::iterator mit = meshobj->GetFirstMaterial(); + mit != meshobj->GetLastMaterial(); ++ mit) { + (*mit)->GetPolyMaterial()->OnConstruction(); + } // ----------------------------------- |