Beispiel #1
0
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();
    }
}
Beispiel #2
0
bool
GlfTestGLContext::_IsEqual(GlfGLContextSharedPtr const &rhs) const
{
    if (const GlfTestGLContext* rhsRaw =
            dynamic_cast<const GlfTestGLContext*>(rhs.get())) {
        return *_context == *rhsRaw->_context;
    }
    return false;
}
Beispiel #3
0
bool
GlfGLRawContext::_IsEqual(const GlfGLContextSharedPtr& rhs) const
{
    if (const GlfGLRawContext* rhsRaw =
                dynamic_cast<const GlfGLRawContext*>(rhs.get())) {
        return _state == rhsRaw->_state;
    }
    return false;
}
Beispiel #4
0
bool
GlfGLContext::AreSharing(GlfGLContextSharedPtr const & context1,
                         GlfGLContextSharedPtr const & context2)
{
    return (context1 && context1->IsSharing(context2));
}
Beispiel #5
0
bool
GlfGLContext::IsSharing(GlfGLContextSharedPtr const & otherContext)
{
    return otherContext && IsValid() &&
           otherContext->IsValid() && _IsSharing(otherContext);
}
Beispiel #6
0
bool
GlfGLContext::IsSharing(GlfGLContextSharedPtr const & otherContext)
{
    return otherContext and IsValid() and
           otherContext->IsValid() and _IsSharing(otherContext);
}