MCPcopy Create free account
hub / github.com/Tencent/tgfx / GetGLVersion

Function GetGLVersion

src/gpu/opengl/GLInterface.cpp:31–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29static std::unordered_map<int, std::shared_ptr<GLInterface>> glInterfaceMap = {};
30
31static 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
40std::shared_ptr<GLInterface> GLInterface::GetNative() {
41 auto getter = GLProcGetter::Make();

Callers 1

GetNativeMethod · 0.70

Calls 1

getProcAddressMethod · 0.45

Tested by

no test coverage detected