MCPcopy Create free account
hub / github.com/comaps/comaps / CreateArrowTexture

Function CreateArrowTexture

libs/drape/texture_manager.cpp:93–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93drape_ptr<Texture> CreateArrowTexture(ref_ptr<dp::GraphicsContext> context,
94 ref_ptr<HWTextureAllocator> textureAllocator, std::string const & texturePath,
95 bool useDefaultResourceFolder)
96{
97 if (!texturePath.empty())
98 {
99 return make_unique_dp<StaticTexture>(context, texturePath,
100 useDefaultResourceFolder ? StaticTexture::kDefaultResource : std::string(),
101 dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
102 }
103
104 // There is no "arrow-texture.png".
105 // BackendRenderer::m_arrow3dPreloadedData mesh is used by default.
106 /// @todo Texture arrow is still present in case if somebody wants to use it?
107 return make_unique_dp<StaticTexture>(context, "arrow-texture.png", StaticTexture::kDefaultResource,
108 dp::TextureFormat::RGBA8, textureAllocator, true /* allowOptional */);
109}
110} // namespace
111
112TextureManager::TextureManager() : m_maxTextureSize(0), m_maxGlypsCount(0)

Callers 2

InitMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected