Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/CCmpTerritoryManager.cpp
Show First 20 Lines • Show All 565 Lines • ▼ Show 20 Lines | void CCmpTerritoryManager::UpdateBoundaryLines() | ||||
m_BoundaryLines.clear(); | m_BoundaryLines.clear(); | ||||
m_DebugBoundaryLineNodes.clear(); | m_DebugBoundaryLineNodes.clear(); | ||||
if (!CRenderer::IsInitialised()) | if (!CRenderer::IsInitialised()) | ||||
return; | return; | ||||
std::vector<STerritoryBoundary> boundaries = ComputeBoundaries(); | std::vector<STerritoryBoundary> boundaries = ComputeBoundaries(); | ||||
CTextureProperties texturePropsBase("art/textures/misc/territory_border.png"); | CTexturePtr textureBase, textureMask; | ||||
texturePropsBase.SetWrap(GL_CLAMP_TO_BORDER, GL_CLAMP_TO_EDGE); | g_Renderer.GetTextureManager().PrepareOverlayTexture("art/textures/misc/territory_border.png", | ||||
texturePropsBase.SetMaxAnisotropy(2.f); | "art/textures/misc/territory_border_mask.png", textureBase, textureMask, 2.f); | ||||
Stan: Can we load a special template instead of Hardcoded this string ? | |||||
CTexturePtr textureBase = g_Renderer.GetTextureManager().CreateTexture(texturePropsBase); | |||||
CTextureProperties texturePropsMask("art/textures/misc/territory_border_mask.png"); | |||||
texturePropsMask.SetWrap(GL_CLAMP_TO_BORDER, GL_CLAMP_TO_EDGE); | |||||
texturePropsMask.SetMaxAnisotropy(2.f); | |||||
CTexturePtr textureMask = g_Renderer.GetTextureManager().CreateTexture(texturePropsMask); | |||||
CmpPtr<ICmpPlayerManager> cmpPlayerManager(GetSystemEntity()); | CmpPtr<ICmpPlayerManager> cmpPlayerManager(GetSystemEntity()); | ||||
if (!cmpPlayerManager) | if (!cmpPlayerManager) | ||||
return; | return; | ||||
for (size_t i = 0; i < boundaries.size(); ++i) | for (size_t i = 0; i < boundaries.size(); ++i) | ||||
{ | { | ||||
if (boundaries[i].points.empty()) | if (boundaries[i].points.empty()) | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Can we load a special template instead of Hardcoded this string ?