X-Git-Url: http://git.mutantstargoat.com?p=demo;a=blobdiff_plain;f=src%2Fmain.cc;h=dc3440d8cb72359ce54f46dccd31658d464de52b;hp=2926420e0280f8954b4d237917b3807ade77c245;hb=7a8a3e835aa4fefb930b843466db1566621e1fbe;hpb=46cc932f7ddb0c81f352bc847973dae6b327ebeb diff --git a/src/main.cc b/src/main.cc index 2926420..dc3440d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3,6 +3,10 @@ #include #include +#include "object.h" +#include "mesh.h" +#include "scene.h" + #include "opengl/opengl.h" #include "vulkan/vk.h" @@ -20,6 +24,7 @@ bool use_vulkan; GLFWwindow *win; /* variables */ +static Scene scene; int main(int argc, char **argv) { @@ -66,6 +71,18 @@ static bool init() return false; } + if(!scene.load("data/spot/spot_control_mesh.obj")) { + fprintf(stderr, "Failed to load scene.\n"); + return false; + } + + for(size_t i=0; imesh->name.c_str()); + printf("material: %s\n", scene.objects[i]->material->name.c_str()); + printf("transform:\n"); + scene.objects[i]->transform.print(); + } return true; }