Loading...
Searching...
No Matches
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
11
12#include "pxr/pxr.h"
13#include "pxr/imaging/glf/api.h"
14#include "pxr/imaging/glf/glContext.h"
15
16#include <memory>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20class Glf_TestGLContextPrivate;
21
22typedef std::shared_ptr<class GlfTestGLContext> GlfTestGLContextSharedPtr;
23
29public:
30 GLF_API
31 static void RegisterGLContextCallbacks();
32
33 // GlfGLContext overrides
34 GLF_API
35 virtual bool IsValid() const;
36
37 GLF_API
38 static GlfTestGLContextSharedPtr Create( GlfTestGLContextSharedPtr const & share );
39
40protected:
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
49private:
50 GlfTestGLContext(Glf_TestGLContextPrivate const * context);
51
52 friend class GlfTestGLContextRegistrationInterface;
53
54private:
55 Glf_TestGLContextPrivate * _context;
56};
57
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif // PXR_IMAGING_GLF_TEST_GLCONTEXT_H
Provides window system independent access to GL contexts.
Definition: glContext.h:36
Testing support class for GlfGLContext.
Definition: testGLContext.h:28
virtual GLF_API bool _IsSharing(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is sharing with rhs.
virtual GLF_API void _MakeCurrent()
Makes this context current.
virtual GLF_API bool _IsEqual(const GlfGLContextSharedPtr &rhs) const
Returns true if this context is equal to rhs.
virtual GLF_API bool IsValid() const
Returns true if this context is valid.