| 154 | }; |
| 155 | |
| 156 | MeshObject::MeshObject(ref_ptr<dp::GraphicsContext> context, DrawPrimitive drawPrimitive, std::string const & debugName) |
| 157 | : m_drawPrimitive(drawPrimitive) |
| 158 | , m_debugName(debugName) |
| 159 | { |
| 160 | auto const apiVersion = context->GetApiVersion(); |
| 161 | if (apiVersion == dp::ApiVersion::OpenGLES3) |
| 162 | { |
| 163 | InitForOpenGL(); |
| 164 | } |
| 165 | else if (apiVersion == dp::ApiVersion::Metal) |
| 166 | { |
| 167 | #if defined(OMIM_METAL_AVAILABLE) |
| 168 | InitForMetal(); |
| 169 | #endif |
| 170 | } |
| 171 | else if (apiVersion == dp::ApiVersion::Vulkan) |
| 172 | { |
| 173 | InitForVulkan(context); |
| 174 | } |
| 175 | CHECK(m_impl != nullptr, ()); |
| 176 | } |
| 177 | |
| 178 | MeshObject::~MeshObject() |
| 179 | { |
nothing calls this directly
no test coverage detected