X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fpolytest.c;h=dfca5ef2a5978aeb3e52d1e3287ccdd5bc290525;hp=207fb31557f925017a86e21acbf93739633fbe3c;hb=45f6f46fe758d15aafccdb69ae837fc7d84ee466;hpb=8cee0ffb00cce3d81487f1161286ac299db7d044 diff --git a/src/polytest.c b/src/polytest.c index 207fb31..dfca5ef 100644 --- a/src/polytest.c +++ b/src/polytest.c @@ -9,6 +9,7 @@ #include "polyfill.h" /* just for struct pimage */ #include "cfgopt.h" #include "mesh.h" +#include "bsptree.h" static int init(void); static void destroy(void); @@ -28,6 +29,7 @@ static struct screen scr = { static float cam_theta, cam_phi = 25; static float cam_dist = 3; static struct g3d_mesh cube, torus; +static struct bsptree torus_bsp; static struct pimage tex; @@ -44,14 +46,20 @@ static int init(void) { int i; - gen_cube(&cube, 1.0, 0); - gen_torus(&torus, 1.0, 0.25, 24, 12); + gen_cube_mesh(&cube, 1.0, 0); + gen_torus_mesh(&torus, 1.0, 0.25, 24, 12); /* scale texcoords */ for(i=0; i