aboutsummaryrefslogtreecommitdiff
path: root/sokol_glue.h
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-02-28 18:36:07 +0100
committerAndre Weissflog <floooh@gmail.com>2024-02-28 18:36:07 +0100
commitacef7660cc2f2c6ceb8e33698a50f931977fb6da (patch)
tree24125250ead1cb3bec6aa7fb1821cb95b8100478 /sokol_glue.h
parentea4c63cf1d4bc7f278db18a30b2dd75890f3a03d (diff)
sokol_glue.h: check for SOKOL_GFX_INCLUDED and SOKOL_APP_IMPL_INCLUDED
Diffstat (limited to 'sokol_glue.h')
-rw-r--r--sokol_glue.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sokol_glue.h b/sokol_glue.h
index 9c80568c..c4794c1b 100644
--- a/sokol_glue.h
+++ b/sokol_glue.h
@@ -100,6 +100,10 @@
#endif
#endif
+#ifndef SOKOL_GFX_INCLUDED
+#error "Please include sokol_gfx.h before sokol_glue.h"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -117,10 +121,15 @@ SOKOL_GLUE_API_DECL sg_swapchain sglue_swapchain(void);
#define SOKOL_GLUE_IMPL_INCLUDED (1)
#include <string.h> /* memset */
+#ifndef SOKOL_APP_IMPL_INCLUDED
+#error "Please include the sokol_app.h implementation before the sokol_glue.h implementation"
+#endif
+
#ifndef SOKOL_API_IMPL
#define SOKOL_API_IMPL
#endif
+
SOKOL_API_IMPL sg_environment sglue_environment(void) {
sg_environment env;
memset(&env, 0, sizeof(env));