Index: source/gameengine/Ketsji/KX_PolygonMaterial.cpp |
=================================================================== |
--- source/gameengine/Ketsji/KX_PolygonMaterial.cpp (revision 40340) |
+++ source/gameengine/Ketsji/KX_PolygonMaterial.cpp (working copy) |
@@ -78,10 +78,10 @@ |
int tile, |
int tilexrep, |
int tileyrep, |
- int mode, |
- int transp, |
+ int alphablend, |
bool alpha, |
bool zsort, |
+ bool light, |
int lightlayer, |
struct MTFace* tface, |
unsigned int* mcol) |
@@ -93,10 +93,12 @@ |
tile, |
tilexrep, |
tileyrep, |
- mode, |
- transp, |
+ alphablend, |
alpha, |
- zsort); |
+ zsort, |
+ light, |
+ (texname && texname != ""?true:false), /* if we have a texture we have image */ |
+ ma?&ma->game:NULL); |
m_tface = tface; |
m_mcol = mcol; |
m_material = ma; |
@@ -168,7 +170,7 @@ |
if (GetCachingInfo() != cachingInfo) |
{ |
if (!cachingInfo) |
- GPU_set_tpage(NULL, 0); |
+ GPU_set_tpage(NULL, 0, 0); |
cachingInfo = GetCachingInfo(); |
@@ -176,15 +178,15 @@ |
{ |
Image *ima = (Image*)m_tface->tpage; |
GPU_update_image_time(ima, rasty->GetTime()); |
- GPU_set_tpage(m_tface, 1); |
+ GPU_set_tpage(m_tface, 1, m_alphablend); |
} |
else |
- GPU_set_tpage(NULL, 0); |
+ GPU_set_tpage(NULL, 0, 0); |
- if(m_drawingmode & RAS_IRasterizer::KX_TWOSIDE) |
+ if(m_drawingmode & RAS_IRasterizer::KX_BACKCULL) |
+ rasty->SetCullFace(true); |
+ else |
rasty->SetCullFace(false); |
- else |
- rasty->SetCullFace(true); |
if ((m_drawingmode & RAS_IRasterizer::KX_LINES) || |
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME)) |
@@ -318,7 +320,7 @@ |
if (PyArg_ParseTuple(args, "O!:setTexture", &PyCapsule_Type, &pytface)) |
{ |
MTFace *tface = (MTFace*) PyCapsule_GetPointer(pytface, KX_POLYGONMATERIAL_CAPSULE_ID); |
- GPU_set_tpage(tface, 1); |
+ GPU_set_tpage(tface, 1, m_alphablend); |
Py_RETURN_NONE; |
} |