HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
glPlatformContextGLX.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_GARCH_GL_PLATFORM_CONTEXT_GLX_H
8 #define PXR_IMAGING_GARCH_GL_PLATFORM_CONTEXT_GLX_H
9 
10 #include "pxr/pxr.h"
11 #include <GL/glx.h>
12 
14 
15 
17 public:
18  /// Construct with the current state.
20 
21  /// Construct with the given state.
22  GarchGLXContextState(Display*, GLXDrawable, GLXContext);
23 
24  /// Compare for equality.
25  bool operator==(const GarchGLXContextState& rhs) const;
26 
27  /// Returns a hash value for the state.
28  size_t GetHash() const;
29 
30  /// Returns \c true if the context state is valid.
31  bool IsValid() const;
32 
33  /// Make the context current.
34  void MakeCurrent();
35 
36  /// Make no context current.
37  static void DoneCurrent();
38 
39 public:
40  Display* display;
41  GLXDrawable drawable;
42  GLXContext context;
43 
44 private:
45  bool _defaultCtor;
46 };
47 
48 // Hide the platform specific type name behind a common name.
50 
51 
53 
54 #endif // PXR_IMAGING_GARCH_GL_PLATFORM_CONTEXT_GLX_H
GarchGLXContextState()
Construct with the current state.
static void DoneCurrent()
Make no context current.
GarchGLXContextState GarchGLPlatformContextState
bool operator==(const GarchGLXContextState &rhs) const
Compare for equality.
size_t GetHash() const
Returns a hash value for the state.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
bool IsValid() const
Returns true if the context state is valid.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
void MakeCurrent()
Make the context current.