UI and interface
[convexer.git] / cxr / test.c
1 #define CXR_IMPLEMENTATION
2 #define CXR_VALVE_MAP_FILE
3 #define CXR_DEBUG 1
4 #include "cxr.h"
5 #include "solid.h"
6
7 int main(int arc, const char *argv[])
8 {
9 cxr_vdf *vdo = cxr_vdf_open(
10 "/home/harry/Documents/blender_addons_remote/addons/convexer/test.vmf" );
11
12 cxr_vmf_context ctx =
13 {
14 .brush_count = 0,
15 .entity_count = 0,
16 .face_count = 0,
17 .detailvbsp = "",
18 .detailmaterial = "",
19 .lightmap_scale = 12,
20 .mapversion = 4,
21 .offset = { 0.0, 0.0, 0.0 },
22 .scale = 32.0,
23 .skyname = "vertigoblue"
24 };
25
26 cxr_world *world = cxr_decompose( &test_mesh, NULL );
27 if( world )
28 {
29 cxr_push_world_vmf( world, &ctx, vdo );
30 cxr_free_world( world );
31 }
32
33 cxr_vmf_begin_entities( &ctx, vdo );
34 cxr_end_vmf( &ctx, vdo );
35
36 cxr_vdf_close(vdo);
37 return 0;
38 }