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

Function ApiVersionFromString

libs/drape/drape_global.hpp:116–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116inline dp::ApiVersion ApiVersionFromString(std::string const & str)
117{
118#if defined(OMIM_METAL_AVAILABLE)
119 if (str == "Metal")
120 return dp::ApiVersion::Metal;
121#endif
122
123#if defined(OMIM_OS_ANDROID)
124 if (str == "Vulkan")
125 return dp::ApiVersion::Vulkan;
126#endif
127
128 if (str == "OpenGLES3")
129 return dp::ApiVersion::OpenGLES3;
130
131 // Default behavior for different OS. Appropriate fallback will be chosen
132 // if default API is not supported.
133#if defined(OMIM_METAL_AVAILABLE)
134 return dp::ApiVersion::Metal;
135#elif defined(OMIM_OS_ANDROID)
136 return dp::ApiVersion::Vulkan;
137#else
138 return dp::ApiVersion::OpenGLES3;
139#endif
140}
141
142class GraphicsContext;
143class TextureManager;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected