HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
glRawContext.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_IMAGING_GLF_GL_RAW_CONTEXT_H
8 #define PXR_IMAGING_GLF_GL_RAW_CONTEXT_H
9 
10 /// \file glf/glRawContext.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/imaging/glf/api.h"
16 
17 #include <memory>
18 
20 
21 
22 typedef std::shared_ptr<class GlfGLRawContext> GlfGLRawContextSharedPtr;
23 
24 class GlfGLRawContext : public GlfGLContext {
25 public:
26  /// Returns a new object with the current context.
27  GLF_API
29 
30  /// Returns a new object with the given state.
31  GLF_API
33 
34  GLF_API
35  virtual ~GlfGLRawContext();
36 
37  /// Returns the held state.
38  const GarchGLPlatformContextState& GetState() const { return _state; }
39 
40  // GlfGLContext overrides
41  GLF_API
42  virtual bool IsValid() const;
43 
44 protected:
45  // GlfGLContext overrides
46  GLF_API
47  virtual void _MakeCurrent();
48  GLF_API
49  virtual bool _IsSharing(const GlfGLContextSharedPtr& rhs) const;
50  GLF_API
51  virtual bool _IsEqual(const GlfGLContextSharedPtr& rhs) const;
52 
53 private:
55 
56 private:
58 };
59 
60 
62 
63 #endif // PXR_IMAGING_GLF_GL_RAW_CONTEXT_H
virtual GLF_API bool _IsSharing(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is sharing with rhs.
#define GLF_API
Definition: api.h:23
static GLF_API GlfGLRawContextSharedPtr New()
Returns a new object with the current context.
virtual GLF_API bool _IsEqual(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is equal to rhs.
virtual GLF_API void _MakeCurrent()
Makes this context current.
PXR_NAMESPACE_OPEN_SCOPE typedef std::shared_ptr< class GlfGLRawContext > GlfGLRawContextSharedPtr
Definition: glRawContext.h:22
virtual GLF_API ~GlfGLRawContext()
std::shared_ptr< class GlfGLContext > GlfGLContextSharedPtr
Definition: drawTarget.h:33
const GarchGLPlatformContextState & GetState() const
Returns the held state.
Definition: glRawContext.h:38
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
virtual GLF_API bool IsValid() const
Returns true if this context is valid.