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:
Diffstat (limited to 'source/gameengine/Ketsji/KX_PolygonMaterial.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index d32f267f0e0..098c136bfa3 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -78,10 +78,10 @@ void KX_PolygonMaterial::Initialize(
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 @@ void KX_PolygonMaterial::Initialize(
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 @@ void KX_PolygonMaterial::DefaultActivate(RAS_IRasterizer* rasty, TCachingInfo& c
if (GetCachingInfo() != cachingInfo)
{
if (!cachingInfo)
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
cachingInfo = GetCachingInfo();
@@ -176,15 +178,15 @@ void KX_PolygonMaterial::DefaultActivate(RAS_IRasterizer* rasty, TCachingInfo& c
{
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)
- rasty->SetCullFace(false);
- else
+ if(m_drawingmode & RAS_IRasterizer::KX_BACKCULL)
rasty->SetCullFace(true);
+ else
+ rasty->SetCullFace(false);
if ((m_drawingmode & RAS_IRasterizer::KX_LINES) ||
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME))
@@ -318,7 +320,7 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setTexture, "setTexture(tface)")
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;
}