void GlfGLContext::MakeCurrent(const GlfGLContextSharedPtr& context) { if (context && context->IsValid()) { context->_MakeCurrent(); // Now that this context is current add it to the registry for // later lookup. GlfGLContextRegistry::GetInstance().DidMakeCurrent(context); } else { DoneCurrent(); } }
bool GlfTestGLContext::_IsEqual(GlfGLContextSharedPtr const &rhs) const { if (const GlfTestGLContext* rhsRaw = dynamic_cast<const GlfTestGLContext*>(rhs.get())) { return *_context == *rhsRaw->_context; } return false; }
bool GlfGLRawContext::_IsEqual(const GlfGLContextSharedPtr& rhs) const { if (const GlfGLRawContext* rhsRaw = dynamic_cast<const GlfGLRawContext*>(rhs.get())) { return _state == rhsRaw->_state; } return false; }
bool GlfGLContext::AreSharing(GlfGLContextSharedPtr const & context1, GlfGLContextSharedPtr const & context2) { return (context1 && context1->IsSharing(context2)); }
bool GlfGLContext::IsSharing(GlfGLContextSharedPtr const & otherContext) { return otherContext && IsValid() && otherContext->IsValid() && _IsSharing(otherContext); }
bool GlfGLContext::IsSharing(GlfGLContextSharedPtr const & otherContext) { return otherContext and IsValid() and otherContext->IsValid() and _IsSharing(otherContext); }