| 29 | static std::unordered_map<int, std::shared_ptr<GLInterface>> glInterfaceMap = {}; |
| 30 | |
| 31 | static int GetGLVersion(const GLProcGetter* getter) { |
| 32 | auto glGetString = reinterpret_cast<GLGetString*>(getter->getProcAddress("glGetString")); |
| 33 | if (glGetString == nullptr) { |
| 34 | return -1; |
| 35 | } |
| 36 | auto versionString = (const char*)glGetString(GL_VERSION); |
| 37 | return GetGLVersion(versionString).majorVersion; |
| 38 | } |
| 39 | |
| 40 | std::shared_ptr<GLInterface> GLInterface::GetNative() { |
| 41 | auto getter = GLProcGetter::Make(); |
no test coverage detected