Added support for lightmaps, but this is completely untested atm.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4549 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
d680a7e792
commit
e0e1d760fa
@ -49,6 +49,7 @@ Material::Material(const XMLNode *node, int index)
|
||||
b=false;
|
||||
node->get("clampV", &b); if(b) m_clamp_tex +=VCLAMP;
|
||||
node->get("transparency", &m_transparency );
|
||||
node->get("lightmap", &m_lightmap );
|
||||
node->get("alpha", &m_alpha_blending );
|
||||
node->get("light", &m_lighting );
|
||||
node->get("sphere", &m_sphere_map );
|
||||
@ -97,6 +98,7 @@ void Material::init(unsigned int index)
|
||||
m_index = index;
|
||||
m_clamp_tex = 0;
|
||||
m_transparency = false;
|
||||
m_lightmap = false;
|
||||
m_alpha_blending = false;
|
||||
m_lighting = true;
|
||||
m_sphere_map = false;
|
||||
@ -135,8 +137,10 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
||||
else if (m_alpha_blending)
|
||||
m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
|
||||
if (m_sphere_map)
|
||||
else if (m_sphere_map)
|
||||
m->MaterialType = video::EMT_SPHERE_MAP;
|
||||
else if (m_lightmap)
|
||||
m->MaterialType = video::EMT_LIGHTMAP;
|
||||
|
||||
if (!m_lighting)
|
||||
{
|
||||
|
@ -45,6 +45,8 @@ private:
|
||||
bool m_sphere_map;
|
||||
bool m_transparency;
|
||||
bool m_alpha_blending;
|
||||
/** True if lightmapping is enabled for this material. */
|
||||
bool m_lightmap;
|
||||
float m_friction;
|
||||
/** How much the top speed is reduced per second. */
|
||||
float m_slowdown;
|
||||
|
Loading…
Reference in New Issue
Block a user