Add --rendering-debug to allow testing material settings or anisotrophy speed.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7700 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -322,7 +322,12 @@ namespace UserConfigParams
|
||||
* must always be printed. */
|
||||
PARAM_PREFIX int m_verbosity PARAM_DEFAULT( 0 );
|
||||
|
||||
PARAM_PREFIX bool m_no_start_screen PARAM_DEFAULT( false ); // not saved to file
|
||||
PARAM_PREFIX bool m_no_start_screen PARAM_DEFAULT( false );
|
||||
|
||||
/** True to test funky ambient/diffuse/specularity in RGB & all anisotropic */
|
||||
PARAM_PREFIX bool m_rendering_debug PARAM_DEFAULT( false );
|
||||
|
||||
// not saved to file
|
||||
|
||||
// ---- Networking
|
||||
PARAM_PREFIX StringUserConfigParam m_server_address
|
||||
|
||||
@@ -399,8 +399,22 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
||||
m->SpecularColor = video::SColor(255, 255, 255, 255);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if(UserConfigParams::m_rendering_debug)
|
||||
{
|
||||
m->Shininess = 100.0f;
|
||||
m->DiffuseColor = video::SColor(200, 255, 0, 0);
|
||||
m->AmbientColor = video::SColor(200, 0, 0, 255);
|
||||
m->SpecularColor = video::SColor(200, 0, 255, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
// anisotropic
|
||||
#ifdef DEBUG
|
||||
if (UserConfigParams::m_rendering_debug || (m_anisotropic && UserConfigParams::m_anisotropic))
|
||||
#else
|
||||
if (m_anisotropic && UserConfigParams::m_anisotropic)
|
||||
#endif
|
||||
{
|
||||
m->setFlag(video::EMF_ANISOTROPIC_FILTER, true);
|
||||
}
|
||||
@@ -439,5 +453,12 @@ void Material::setMaterialProperties(video::SMaterial *m) const
|
||||
m->setFlag(video::EMF_BACK_FACE_CULLING, false);
|
||||
|
||||
m->ColorMaterial = video::ECM_DIFFUSE_AND_AMBIENT;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (UserConfigParams::m_rendering_debug)
|
||||
{
|
||||
m->ColorMaterial = video::ECM_NONE; // Override one above
|
||||
}
|
||||
#endif
|
||||
|
||||
} // setMaterialProperties
|
||||
|
||||
@@ -441,6 +441,10 @@ int handleCmdLine(int argc, char **argv)
|
||||
{
|
||||
UserConfigParams::m_slipstream_debug=true;
|
||||
}
|
||||
else if(!strcmp(argv[i], "--rendering-debug"))
|
||||
{
|
||||
UserConfigParams::m_rendering_debug=true;
|
||||
}
|
||||
else if(sscanf(argv[i], "--server=%d",&n)==1)
|
||||
{
|
||||
network_manager->setMode(NetworkManager::NW_SERVER);
|
||||
|
||||
Reference in New Issue
Block a user