24 #ifndef PXR_IMAGING_GLF_GL_CONTEXT_H
25 #define PXR_IMAGING_GLF_GL_CONTEXT_H
103 virtual bool IsValid()
const = 0;
182 GlfGLContextScopeHolder&
operator=(
const GlfGLContextScopeHolder) =
delete;
255 #define API_GLF_HAS_ANY_GL_CONTEXT_SCOPE_HOLDER 1
319 current->IsValid() &&
GlfGLContext & operator=(const GlfGLContext &)=delete
static GLF_API bool IsInitialized()
Returns whether this interface has been initialized.
virtual void _MakeCurrent()=0
Makes this context current.
static GLF_API void DoneCurrent()
Makes no context current.
GLF_API GlfGLContextRegistrationInterface()
GlfAnyGLContextScopeHolder()
static GLF_API GlfGLContextSharedPtr GetSharedGLContext()
Returns an instance for the shared GL context.
virtual GLF_API ~GlfGLContext()
GLF_API void _MakeNewContextCurrent()
virtual bool IsValid() const =0
Returns true if this context is valid.
GlfGLContextScopeHolder & operator=(const GlfGLContextScopeHolder)=delete
virtual bool _IsEqual(const GlfGLContextSharedPtr &rhs) const =0
Returns true if this context is equal to rhs.
GLF_API bool IsCurrent() const
Returns true if this context is current.
GLF_API bool IsSharing(GlfGLContextSharedPtr const &otherContext)
Returns true if this context is sharing with otherContext.
virtual GLF_API ~GlfGLContextRegistrationInterface()
PXR_NAMESPACE_OPEN_SCOPE ARCH_API bool ArchIsMainThread()
std::shared_ptr< class GlfGLContext > GlfGLContextSharedPtr
virtual GlfGLContextSharedPtr CreateSharingContext()
static GLF_API bool AreSharing(GlfGLContextSharedPtr const &context1, GlfGLContextSharedPtr const &context2)
Returns true if context1 and context2 are sharing.
static GLF_API void MakeCurrent(const GlfGLContextSharedPtr &context)
Makes context current if valid, otherwise makes no context current.
GLF_API void _RestoreOldContext()
GlfSharedGLContextScopeHolder()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
GLF_API GlfGLContextScopeHolder(const GlfGLContextSharedPtr &newContext)
PXR_NAMESPACE_OPEN_SCOPE typedef std::shared_ptr< class GlfGLContext > GlfGLContextSharedPtr
#define PXR_NAMESPACE_CLOSE_SCOPE
GlfGLContextRegistrationInterface & operator=(const GlfGLContextRegistrationInterface &)=delete
virtual bool _IsSharing(const GlfGLContextSharedPtr &rhs) const =0
Returns true if this context is sharing with rhs.
static GLF_API GlfGLContextSharedPtr GetCurrentGLContext()
Returns an instance for the current GL context.
virtual GlfGLContextSharedPtr GetShared()=0
GLF_API ~GlfGLContextScopeHolder()
virtual GlfGLContextSharedPtr GetCurrent()=0