HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
glPlatformDebugContext.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_DEBUG_CONTEXT_H
8 #define PXR_IMAGING_GARCH_GL_PLATFORM_DEBUG_CONTEXT_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/garch/api.h"
13 #include "pxr/base/tf/weakBase.h"
14 
15 #include <memory>
16 
18 
19 
20 class GarchGLPlatformDebugContextPrivate;
21 
23 
24 /// \class GarchGLPlatformDebugContext
25 ///
26 /// Platform specific context (e.g. X11/GLX) which supports debug output.
27 ///
29 public:
30 
31  static GarchGLPlatformDebugContextRefPtr
32  New(int majorVersion, int minorVersion, bool coreProfile,
33  bool directRenderering) {
34  return TfCreateRefPtr(
36  majorVersion, minorVersion, coreProfile, directRenderering));
37  }
38 
40 
41  GARCH_API
42  static bool IsEnabledDebugOutput();
43 
44  GARCH_API
45  static bool IsEnabledCoreProfile();
46 
47  GARCH_API
48  void makeCurrent();
49 
50  GARCH_API
51  void *chooseMacVisual();
52 
53 public:
54  std::unique_ptr<GarchGLPlatformDebugContextPrivate> _private;
56 
57 protected:
58  GARCH_API
59  GarchGLPlatformDebugContext(int majorVersion,
60  int minorVersion,
61  bool coreProfile,
62  bool directRenderering);
63 
64 };
65 
66 
68 
69 #endif // PXR_IMAGING_GARCH_GL_PLATFORM_DEBUG_CONTEXT_H
TfRefPtr< T > TfCreateRefPtr(T *ptr)
Definition: refPtr.h:1190
static GarchGLPlatformDebugContextRefPtr New(int majorVersion, int minorVersion, bool coreProfile, bool directRenderering)
static GARCH_API bool IsEnabledDebugOutput()
static GARCH_API bool IsEnabledCoreProfile()
TF_DECLARE_WEAK_AND_REF_PTRS(GarchGLPlatformDebugContext)
GARCH_API GarchGLPlatformDebugContext(int majorVersion, int minorVersion, bool coreProfile, bool directRenderering)
#define GARCH_API
Definition: api.h:23
virtual ~GarchGLPlatformDebugContext()
std::unique_ptr< GarchGLPlatformDebugContextPrivate > _private
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
GARCH_API void * chooseMacVisual()
GARCH_API void makeCurrent()