]> git.bts.cx Git - benzene.git/blob - src/bz/renderer/renderer.h
Initial version
[benzene.git] / src / bz / renderer / renderer.h
1 #ifndef BZ_RENDERER_RENDERER_H
2 #define BZ_RENDERER_RENDERER_H
3
4 #include <bz/memory/arena.h>
5 #include <bz/renderer/palette.h>
6 #include <bz/renderer/render_pass.h>
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 struct BZRendererConfiguration {
13 size_t outputWidth;
14 size_t outputHeight;
15 size_t rendererWidth;
16 size_t rendererHeight;
17 size_t gameWidth;
18 size_t gameHeight;
19 BZRendererPaletteID palette;
20 };
21 typedef struct BZRendererConfiguration BZRendererConfiguration;
22
23 typedef struct BZRenderer BZRenderer;
24 typedef BZRenderer * BZRendererID;
25
26 typedef struct BZRendererPass BZRendererPass;
27 typedef BZRendererPass * BZRendererPassID;
28
29 extern BZRendererID bzRendererInit(BZMemoryArenaID arena, const BZRendererConfiguration *configuration, const char *title);
30 extern void bzRendererTeardown(BZRendererID renderer);
31
32 BZRendererPassID bzRendererRegisterPass(BZRendererID renderer, BZRenderPassID renderPass);
33 extern void bzRendererUnregisterPass(BZRendererPassID rendererPass);
34
35 extern void bzRendererBlit(BZRendererID renderer);
36 extern void bzRendererVBlank(BZRendererID renderer);
37
38 #ifdef __cplusplus
39 }
40 #endif
41
42 #endif