OpenGLContext::CachedImage* OpenGLContext::getCachedImage() const noexcept { if (Component* const comp = getTargetComponent()) return CachedImage::get (*comp); return nullptr; }
void OpenGLContext::attachTo (Component& component) { component.repaint(); if (getTargetComponent() != &component) { detach(); attachment = new Attachment (*this, component); } }
OpenGLContext::CachedImage* OpenGLContext::getCachedImage() const noexcept { Component* const comp = getTargetComponent(); return comp != nullptr ? CachedImage::get (*comp) : nullptr; }