Voxvision  1
Creating and manipulating voxel octrees
engine.h
Go to the documentation of this file.
1 
5 #ifndef ENGINE_H
6 #define ENGINE_H
7 #ifdef USE_GCD
8 #include <dispatch/dispatch.h>
9 #else
10 #include "../gcd-stubs.c"
11 #endif
12 
13 #include "../voxtrees/tree.h"
14 #include "../voxrnd/camera.h"
15 #include "../voxrnd/fps-control.h"
16 #include "../voxrnd/renderer.h"
17 #include "../voxrnd/cd.h"
18 
19 #ifdef VOXENGINE_SOURCE
20 struct vox_engine {
21  struct vox_rnd_ctx *ctx;
22  lua_State *L;
23  dispatch_queue_t rendering_queue;
24  unsigned int width, height;
25  unsigned int flags;
26 };
27 #else /* VOXENGINE_SOURCE */
28 
36 struct vox_engine {
37  struct vox_rnd_ctx *ctx;
39 };
40 #endif /* VOXENGINE_SOURCE */
41 
45 #define VOX_ENGINE_DEBUG 1
46 
68 VOX_EXPORT struct vox_engine*
69 vox_create_engine (unsigned int width, unsigned int height,
70  unsigned int flags,
71  const char *script,
72  int nargs, char * const arguments[]);
73 
77 typedef int vox_engine_status;
78 
82 #define vox_engine_quit_requested(stat) (!(stat))
83 
93 VOX_EXPORT vox_engine_status vox_engine_tick (struct vox_engine *engine);
94 
98 VOX_EXPORT void vox_destroy_engine (struct vox_engine *engine);
99 
100 #endif
int vox_engine_status
Return type for vox_engine_tick
Definition: engine.h:77
VOX_EXPORT void vox_destroy_engine(struct vox_engine *engine)
Destroy an engine.
VOX_EXPORT struct vox_engine * vox_create_engine(unsigned int width, unsigned int height, unsigned int flags, const char *script, int nargs, char *const arguments[])
Create voxengine.
VOX_EXPORT vox_engine_status vox_engine_tick(struct vox_engine *engine)
Engine tick function.
Voxengine instance.
Definition: engine.h:36
struct vox_rnd_ctx * ctx
renderer context used by an engine
Definition: engine.h:37
A renderer context.
Definition: renderer.h:45