| 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(); |
no test coverage detected