summaryrefslogtreecommitdiff
path: root/libs/nanovg/example/demo.h
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
committersanine <sanine.not@pm.me>2023-02-12 23:53:22 -0600
commitf1fe73d1909a2448a004a88362a1a532d0d4f7c3 (patch)
treeab37ae3837e2f858de2932bcee9f26e69fab3db1 /libs/nanovg/example/demo.h
parentf567ea1e2798fd3156a416e61f083ea3e6b95719 (diff)
switch to tinyobj and nanovg from assimp and cairo
Diffstat (limited to 'libs/nanovg/example/demo.h')
-rw-r--r--libs/nanovg/example/demo.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/nanovg/example/demo.h b/libs/nanovg/example/demo.h
new file mode 100644
index 0000000..aace449
--- /dev/null
+++ b/libs/nanovg/example/demo.h
@@ -0,0 +1,26 @@
+#ifndef DEMO_H
+#define DEMO_H
+
+#include "nanovg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct DemoData {
+ int fontNormal, fontBold, fontIcons, fontEmoji;
+ int images[12];
+};
+typedef struct DemoData DemoData;
+
+int loadDemoData(NVGcontext* vg, DemoData* data);
+void freeDemoData(NVGcontext* vg, DemoData* data);
+void renderDemo(NVGcontext* vg, float mx, float my, float width, float height, float t, int blowup, DemoData* data);
+
+void saveScreenShot(int w, int h, int premult, const char* name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // DEMO_H