Loading...
Searching...
No Matches
contextCaps.h
1//
2// Copyright 2018 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_CONTEXT_CAPS_H
8#define PXR_IMAGING_GLF_CONTEXT_CAPS_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/glf/api.h"
13
14
15PXR_NAMESPACE_OPEN_SCOPE
16
17
42{
43public:
44
49 GLF_API
50 static void InitInstance();
51
55 GLF_API
56 static const GlfContextCaps &GetInstance();
57
58 // GL version
59 int glVersion; // 400 (4.0), 410 (4.1), ...
60
61 // Whether or not we are running with core profile
62 bool coreProfile;
63
64 // Max constants
65 int maxArrayTextureLayers;
66
67private:
68 void _LoadCaps();
70 ~GlfContextCaps() = default;
71
72 // Disallow copies
73 GlfContextCaps(const GlfContextCaps&) = delete;
74 GlfContextCaps& operator=(const GlfContextCaps&) = delete;
75
76 friend class TfSingleton<GlfContextCaps>;
77};
78
79GLF_API_TEMPLATE_CLASS(TfSingleton<GlfContextCaps>);
80
81PXR_NAMESPACE_CLOSE_SCOPE
82
83#endif // PXR_IMAGING_GLF_CONTEXT_CAPS_H
84
This class is intended to be a cache of the capabilites (resource limits and features) of the underly...
Definition: contextCaps.h:42
static GLF_API const GlfContextCaps & GetInstance()
GetInstance() returns the filled capabilities structure.
static GLF_API void InitInstance()
InitInstance queries the GL context for its capabilities.
Manage a single instance of an object (see.
Definition: singleton.h:105
Manage a single instance of an object.