aboutsummaryrefslogtreecommitdiffstats
path: root/al/direct_defs.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-14 00:55:54 -0700
committerChris Robinson <[email protected]>2023-05-14 01:27:14 -0700
commit6a007660fb7bac51f01ef0b9466bfcc6ade7389b (patch)
tree2b7764e1132f8466a731cd26934dfa7ea73154ed /al/direct_defs.h
parent54ce34ba9901b3d7ad231a49587f60918e45ac90 (diff)
Implement direct functions for context state
Diffstat (limited to 'al/direct_defs.h')
-rw-r--r--al/direct_defs.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/al/direct_defs.h b/al/direct_defs.h
new file mode 100644
index 00000000..555e9565
--- /dev/null
+++ b/al/direct_defs.h
@@ -0,0 +1,35 @@
+#ifndef AL_DIRECT_DEFS_H
+#define AL_DIRECT_DEFS_H
+
+#define DECL_FUNC(R, Name) \
+R AL_API Name(void) START_API_FUNC \
+{ \
+ return Name##Direct(GetContextRef().get()); \
+} END_API_FUNC
+
+#define DECL_FUNC1(R, Name, T1) \
+R AL_API Name(T1 a) START_API_FUNC \
+{ \
+ return Name##Direct(GetContextRef().get(), a); \
+} END_API_FUNC
+
+#define DECL_FUNC2(R, Name, T1, T2) \
+R AL_API Name(T1 a, T2 b) START_API_FUNC \
+{ \
+ return Name##Direct(GetContextRef().get(), a, b); \
+} END_API_FUNC
+
+
+#define DECL_FUNCEXT(R, Name,Ext) \
+R AL_API Name##Ext(void) START_API_FUNC \
+{ \
+ return Name##Direct##Ext(GetContextRef().get()); \
+} END_API_FUNC
+
+#define DECL_FUNCEXT2(R, Name,Ext, T1, T2) \
+R AL_API Name##Ext(T1 a, T2 b) START_API_FUNC \
+{ \
+ return Name##Direct##Ext(GetContextRef().get(), a, b); \
+} END_API_FUNC
+
+#endif /* AL_DIRECT_DEFS_H */