mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Add some prerequisits for making shadows disableable
This commit is contained in:
parent
166ba22072
commit
7a9df977c7
1 changed files with 7 additions and 1 deletions
|
@ -165,6 +165,7 @@ namespace Shader
|
|||
}
|
||||
std::string list = source.substr(listStart, listEnd - listStart);
|
||||
std::vector<std::string> listElements;
|
||||
if (list != "")
|
||||
boost::split(listElements, list, boost::is_any_of(","));
|
||||
|
||||
size_t contentStart = source.find_first_not_of("\n\r", listEnd);
|
||||
|
@ -282,6 +283,11 @@ namespace Shader
|
|||
// remove extra comma
|
||||
definesWithShadows["shadow_texture_unit_list"] = definesWithShadows["shadow_texture_unit_list"].substr(0, definesWithShadows["shadow_texture_unit_list"].length() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
definesWithShadows.insert(std::make_pair(std::string("shadows_enabled"), std::string("0")));
|
||||
definesWithShadows["shadow_texture_unit_list"] = "";
|
||||
}
|
||||
|
||||
definesWithShadows.insert(defines.begin(), defines.end());
|
||||
|
||||
|
|
Loading…
Reference in a new issue