Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1123)

Unified Diff: source/gameengine/Ketsji/KX_PolygonMaterial.cpp

Issue 4289041: BGE: Material replacement for texface options (Closed) Base URL: https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Patch Set: Final patch - to be committed tomorrow morning Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/gameengine/Ketsji/KX_PolygonMaterial.h ('k') | source/gameengine/Rasterizer/RAS_IPolygonMaterial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « source/gameengine/Ketsji/KX_PolygonMaterial.h ('k') | source/gameengine/Rasterizer/RAS_IPolygonMaterial.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b