Loading...
Searching...
No Matches
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
11
12#include "pxr/pxr.h"
13#include "pxr/imaging/glf/api.h"
14#include "pxr/imaging/glf/glContext.h"
16
17#include <memory>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21
22typedef std::shared_ptr<class GlfGLRawContext> GlfGLRawContextSharedPtr;
23
24class GlfGLRawContext : public GlfGLContext {
25public:
27 GLF_API
28 static GlfGLRawContextSharedPtr New();
29
31 GLF_API
32 static GlfGLRawContextSharedPtr New(const GarchGLPlatformContextState&);
33
34 GLF_API
35 virtual ~GlfGLRawContext();
36
38 const GarchGLPlatformContextState& GetState() const { return _state; }
39
40 // GlfGLContext overrides
41 GLF_API
42 virtual bool IsValid() const;
43
44protected:
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
53private:
54 GlfGLRawContext(const GarchGLPlatformContextState&);
55
56private:
57 GarchGLPlatformContextState _state;
58};
59
60
61PXR_NAMESPACE_CLOSE_SCOPE
62
63#endif // PXR_IMAGING_GLF_GL_RAW_CONTEXT_H
Provides window system independent access to GL contexts.
Definition: glContext.h:36
virtual bool _IsEqual(const GlfGLContextSharedPtr &rhs) const =0
Returns true if this context is equal to rhs.
virtual void _MakeCurrent()=0
Makes this context current.
virtual bool _IsSharing(const GlfGLContextSharedPtr &rhs) const =0
Returns true if this context is sharing with rhs.
virtual bool IsValid() const =0
Returns true if this context is valid.