HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testGLContext.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_TEST_GLCONTEXT_H
8 #define PXR_IMAGING_GLF_TEST_GLCONTEXT_H
9 
10 /// \file glf/testGLContext.h
11 
12 #include "pxr/pxr.h"
13 #include "pxr/imaging/glf/api.h"
15 
16 #include <memory>
17 
19 
20 class Glf_TestGLContextPrivate;
21 
22 typedef std::shared_ptr<class GlfTestGLContext> GlfTestGLContextSharedPtr;
23 
24 /// \class GlfTestGLContext
25 ///
26 /// Testing support class for GlfGLContext.
27 ///
29 public:
30  GLF_API
31  static void RegisterGLContextCallbacks();
32 
33  // GlfGLContext overrides
34  GLF_API
35  virtual bool IsValid() const;
36 
37  GLF_API
39 
40 protected:
41  // GlfGLContext overrides
42  GLF_API
43  virtual void _MakeCurrent();
44  GLF_API
45  virtual bool _IsSharing(const GlfGLContextSharedPtr& rhs) const;
46  GLF_API
47  virtual bool _IsEqual(const GlfGLContextSharedPtr& rhs) const;
48 
49 private:
50  GlfTestGLContext(Glf_TestGLContextPrivate const * context);
51 
53 
54 private:
55  Glf_TestGLContextPrivate * _context;
56 };
57 
58 
60 
61 #endif // PXR_IMAGING_GLF_TEST_GLCONTEXT_H
#define GLF_API
Definition: api.h:23
virtual GLF_API bool _IsSharing(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is sharing with rhs.
virtual GLF_API bool _IsEqual(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is equal to rhs.
static GLF_API GlfTestGLContextSharedPtr Create(GlfTestGLContextSharedPtr const &share)
std::shared_ptr< class GlfGLContext > GlfGLContextSharedPtr
Definition: drawTarget.h:33
static GLF_API void RegisterGLContextCallbacks()
virtual GLF_API bool IsValid() const
Returns true if this context is valid.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
std::shared_ptr< class GlfTestGLContext > GlfTestGLContextSharedPtr
Definition: testGLContext.h:20
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
friend class GlfTestGLContextRegistrationInterface
Definition: testGLContext.h:52
virtual GLF_API void _MakeCurrent()
Makes this context current.