+ static const float scalemat[16] = {-6, 0, 0, 0, 0, -6, 0, 0, 0, 0, -6, 0, 0, 0, 0, 1};
+ /*
+ if(!(tex_inner.pixels = img_load_pixels("data/crate.jpg", &tex_inner.width,
+ &tex_inner.height, IMG_FMT_RGB24))) {
+ fprintf(stderr, "infcubes: failed to load crate texture\n");
+ return -1;
+ }
+ convimg_rgb24_rgb16(tex_inner.pixels, (unsigned char*)tex_inner.pixels, tex_inner.width, tex_inner.height);
+ */
+ gen_phong_tex(&tex_inner, PHONG_TEX_SZ, PHONG_TEX_SZ, 5.0f, 0, 0, 10, 50, 92, 192, 192, 192);
+
+ if(!(tex_outer.pixels = img_load_pixels("data/refmap1.jpg", &tex_outer.width,
+ &tex_outer.height, IMG_FMT_RGB24))) {
+ fprintf(stderr, "infcubes: failed to load outer texture\n");
+ return -1;
+ }
+ convimg_rgb24_rgb16(tex_outer.pixels, (unsigned char*)tex_outer.pixels, tex_outer.width, tex_outer.height);
+ /*gen_phong_tex(&tex_outer, PHONG_TEX_SZ, PHONG_TEX_SZ, 5.0f, 50, 50, 50, 255, 255, 255);*/
+
+ /*
+ if(gen_cube_mesh(&mesh_cube, 1.0f, 3) == -1) {
+ return -1;
+ }
+ */
+ if(load_mesh(&mesh_cube, "data/bevelbox.obj") == -1) {
+ return -1;
+ }
+ if(load_mesh(&mesh_cube2, "data/bevelbox.obj") == -1) {
+ return -1;
+ }
+ apply_mesh_xform(&mesh_cube2, scalemat);
+ normalize_mesh_normals(&mesh_cube2);