aboutsummaryrefslogtreecommitdiffstats
path: root/alc/context.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-03 10:42:32 -0700
committerChris Robinson <[email protected]>2023-05-03 12:18:42 -0700
commitce588ea5a3c3ee6c7fce64ec501a03ebaca373d4 (patch)
tree56bdc75dc41cc4d59b88f086c974bd7a648dbc2a /alc/context.h
parent90b0840d62a123e946e81f514bbe331897da8838 (diff)
Implement a context debug flag
Setting the debug flag at context creation enables more debug messages for the created context, and enables debug messages by default.
Diffstat (limited to 'alc/context.h')
-rw-r--r--alc/context.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/alc/context.h b/alc/context.h
index 9381db04..402794eb 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -43,6 +43,12 @@ enum class DebugSeverity : uint8_t;
using uint = unsigned int;
+enum ContextFlags {
+ DebugBit = 0, /* ALC_CONTEXT_DEBUG_BIT_EXT */
+};
+using ContextFlagBitset = std::bitset<sizeof(ALuint)*8>;
+
+
struct DebugLogEntry {
const DebugSource mSource;
const DebugType mType;
@@ -103,6 +109,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
std::atomic<ALenum> mLastError{AL_NO_ERROR};
+ const ContextFlagBitset mContextFlags;
std::atomic<bool> mDebugEnabled{false};
DistanceModel mDistanceModel{DistanceModel::Default};
@@ -141,7 +148,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext>, ContextBase {
std::string mExtensionListOverride{};
- ALCcontext(al::intrusive_ptr<ALCdevice> device);
+ ALCcontext(al::intrusive_ptr<ALCdevice> device, ContextFlagBitset flags);
ALCcontext(const ALCcontext&) = delete;
ALCcontext& operator=(const ALCcontext&) = delete;
~ALCcontext();