mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-10-31 16:56:47 +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,7 +165,8 @@ namespace Shader | |||
|             } | ||||
|             std::string list = source.substr(listStart, listEnd - listStart); | ||||
|             std::vector<std::string> listElements; | ||||
|             boost::split(listElements, list, boost::is_any_of(",")); | ||||
|             if (list != "") | ||||
|                 boost::split(listElements, list, boost::is_any_of(",")); | ||||
| 
 | ||||
|             size_t contentStart = source.find_first_not_of("\n\r", listEnd); | ||||
|             size_t contentEnd = source.find("$endforeach", contentStart); | ||||
|  | @ -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