X-Git-Url: https://harrygodden.com/git/?p=convexer.git;a=blobdiff_plain;f=cxr%2Ftest.c;fp=cxr%2Ftest.c;h=3903b9636e0a291c283fb72ec7bc690c2e92d3c9;hp=b8d91d89a67ba679a974d781341f240eb4a8fd26;hb=dbd379f76bcb2139fdb5740232511fa789018e10;hpb=8e1b6889db7ce10f8d594539ef74dc4390e8e891 diff --git a/cxr/test.c b/cxr/test.c index b8d91d8..3903b96 100644 --- a/cxr/test.c +++ b/cxr/test.c @@ -1,4 +1,31 @@ -#define CXR_IMPLEMENTATION +#define CXR_VALVE_BIN +#include "cxr.h" + +int main(int arc, const char *argv[]) +{ + if( cxr_fs_set_gameinfo( + "/home/harry/.steam/steam/steamapps/common/" + "Counter-Strike Global Offensive/csgo/gameinfo.txt" ) ) + { + cxr_tri_mesh *mesh_test = cxr_load_mdl( "models/pigeon.mdl" ); + + if( mesh_test ) + { + cxr_log( "Mesh loaded\n" ); + cxr_free_tri_mesh( mesh_test ); + } + else + cxr_log( "Mesh failed to load\n" ); + } + + cxr_fs_exit(); + return 0; +} + + + + +#if 0 #define CXR_VALVE_MAP_FILE #define CXR_DEBUG 1 #include "cxr.h" @@ -36,3 +63,4 @@ int main(int arc, const char *argv[]) cxr_vdf_close(vdo); return 0; } +#endif