Loading...
Searching...
No Matches
glPlatformContext.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_H
8#define PXR_IMAGING_GARCH_GL_PLATFORM_CONTEXT_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/imaging/garch/api.h"
14#include "pxr/base/arch/defines.h"
15#include <cstddef>
16#include <functional>
17
18#if defined(ARCH_OS_LINUX)
19
20#include "pxr/imaging/garch/glPlatformContextGLX.h"
21
22#elif defined(ARCH_OS_DARWIN)
23
24#include "pxr/imaging/garch/glPlatformContextDarwin.h"
25
26#elif defined(ARCH_OS_WINDOWS)
27
28#include "pxr/imaging/garch/glPlatformContextWindows.h"
29
30#else
31
32#error "Unknown platform"
33
34#endif
35
36PXR_NAMESPACE_OPEN_SCOPE
37
38GARCH_API GarchGLPlatformContextState GarchGetNullGLPlatformContextState();
39
40PXR_NAMESPACE_CLOSE_SCOPE
41
42namespace std
43{
44template<>
45struct hash<PXR_NS::GarchGLPlatformContextState>
46{
47 inline size_t operator()(const PXR_NS::GarchGLPlatformContextState& x) const
48 {
49 return x.GetHash();
50 }
51};
52}
53
54
55#endif // PXR_IMAGING_GARCH_GL_PLATFORM_CONTEXT_H
STL namespace.