MCPcopy Index your code
hub / github.com/ad-si/LuaCAD / ensureFunctionPointers

Function ensureFunctionPointers

OpenCSG/src/context.cpp:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 static std::map<int, ContextData> gContextDataMap;
61
62 void ensureFunctionPointers()
63 {
64 // In theory (and probably under Windows only), OpenGL function
65 // pointers could be context specific. I.e., after changing to
66 // a different context, it may be required to update the function
67 // pointers again, or, to store them per context in the first place.
68 // When changing from GLEW to glad, it turned out that this had
69 // never been correctly considered. So I decided to ignore this
70 // potential problem until I get concrete complaints.
71 static bool sHaveOpenGLFunctions = false;
72 if (!sHaveOpenGLFunctions)
73 initExtensionLibrary();
74 sHaveOpenGLFunctions = true;
75 }
76
77 OffscreenBuffer* getOffscreenBuffer(OffscreenType type) {
78 int context = getContext();

Callers 1

renderFunction · 0.85

Calls 1

initExtensionLibraryFunction · 0.85

Tested by

no test coverage detected