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:
authorCampbell Barton <ideasman42@gmail.com>2008-06-15 13:43:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-15 13:43:24 +0400
commitf63b70635c91062a8ef71b2a1f82ac8d4bb06372 (patch)
treedbdabe007b3f7b56be9437f13f3a84aa99bd02e4 /source/gameengine
parentc76bce9e6407aa9adda3bd1b1d66fe3b8d88299f (diff)
bugfix, clip alpha wasn't working in the GE, not happy with these functions, they probably need bigger changes not to assume all alpha requires face sorting with a disabled depth buffer,
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 5a9cda67941..cb981f55c5a 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -542,7 +542,7 @@ BL_Material* ConvertMaterial(
material->amb = mat->amb;
// set alpha testing without z-sorting
- if( ( validface && (!tface->transp)) && mat->mode & MA_ZTRA) {
+ if( ( validface && (!(tface->transp &~ TF_CLIP))) && mat->mode & MA_ZTRA) {
// sets the RAS_IPolyMaterial::m_flag |RAS_FORCEALPHA
// this is so we don't have the overhead of the z-sorting code
material->ras_mode|=ALPHA_TEST;
@@ -598,7 +598,7 @@ BL_Material* ConvertMaterial(
material->ras_mode |= ( (tface->mode & TF_DYNAMIC)!= 0 )?COLLIDER:0;
material->transp = tface->transp;
- if(tface->transp)
+ if(tface->transp&~TF_CLIP)
material->ras_mode |= TRANSP;
material->tile = tface->tile;
@@ -947,7 +947,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, RAS_IRenderTools*
// Use texface colors if available
//TF_DYNAMIC means the polygon is a collision face
collider = ((tface->mode & TF_DYNAMIC) != 0);
- transp = tface->transp;
+ transp = tface->transp &~ TF_CLIP;
tile = tface->tile;
mode = tface->mode;
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 5efe1ad26ca..cc978760da7 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -493,7 +493,7 @@ bool KX_BlenderMaterial::setDefaultBlending()
glDisable(GL_BLEND);
glEnable ( GL_ALPHA_TEST );
glAlphaFunc(GL_GREATER, 0.5f);
- return true;
+ return false;
}
return false;
}