///////////////////////////////////////////////////////
| 204 | |
| 205 | //////////////////////////////////////////////////////////// |
| 206 | bool WglContext::makeCurrent(bool current) |
| 207 | { |
| 208 | if (!m_deviceContext || !m_context) |
| 209 | return false; |
| 210 | |
| 211 | if (wglMakeCurrent(m_deviceContext, current ? m_context : nullptr) == FALSE) |
| 212 | { |
| 213 | err() << "Failed to " << (current ? "activate" : "deactivate") |
| 214 | << " OpenGL context: " << getErrorString(GetLastError()) << std::endl; |
| 215 | return false; |
| 216 | } |
| 217 | |
| 218 | WglContextImpl::currentContext = (current ? this : nullptr); |
| 219 | |
| 220 | return true; |
| 221 | } |
| 222 | |
| 223 | |
| 224 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected