X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Finfcubes.c;h=3df25fe834713727cb18687deb5d992a5913cc75;hp=cfa665b84989cee7877bd40bdc4f5148b85b285f;hb=a1ede8e271fee1b4d029752603096db2be780e67;hpb=8cee0ffb00cce3d81487f1161286ac299db7d044 diff --git a/src/infcubes.c b/src/infcubes.c index cfa665b..3df25fe 100644 --- a/src/infcubes.c +++ b/src/infcubes.c @@ -8,6 +8,7 @@ #include "polyfill.h" #include "imago2.h" #include "gfxutil.h" +#include "mesh.h" static int init(void); static void destroy(void); @@ -26,6 +27,7 @@ static struct screen scr = { static float cam_theta = -29, cam_phi = 35; static float cam_dist = 5; static struct pimage tex_crate; +static struct g3d_mesh mesh_cube; struct screen *infcubes_screen(void) { @@ -54,6 +56,10 @@ static int init(void) int b = *src++; *dst++ = PACK_RGB16(r, g, b); } + + if(gen_cube_mesh(&mesh_cube, 1.0f, 3) == -1) { + return -1; + } return 0; } @@ -99,7 +105,8 @@ static void draw(void) draw_cube(-6); g3d_polygon_mode(G3D_TEX); - draw_cube(1); + /*draw_cube(1);*/ + draw_mesh(&mesh_cube); swap_buffers(fb_pixels); }