Loading...
Searching...
No Matches
glPlatformContextGLX.h
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
13PXR_NAMESPACE_OPEN_SCOPE
14
15
16class GarchGLXContextState {
17public:
19 GarchGLXContextState();
20
22 GarchGLXContextState(Display*, GLXDrawable, GLXContext);
23
25 bool operator==(const GarchGLXContextState& rhs) const;
26
28 size_t GetHash() const;
29
31 bool IsValid() const;
32
34 void MakeCurrent();
35
37 static void DoneCurrent();
38
39public:
40 Display* display;
41 GLXDrawable drawable;
42 GLXContext context;
43
44private:
45 bool _defaultCtor;
46};
47
48// Hide the platform specific type name behind a common name.
49typedef GarchGLXContextState GarchGLPlatformContextState;
50
51
52PXR_NAMESPACE_CLOSE_SCOPE
53
54#endif // PXR_IMAGING_GARCH_GL_PLATFORM_CONTEXT_GLX_H