#include "mesh.h"
#include "meshgen.h"
#include "scene.h"
+#include "metascene.h"
#include "datamap.h"
static void draw_scene();
float ambient[] = {0.0, 0.0, 0.0, 0.0};
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
+ scn = new Scene(&texman);
+ if(!load_scene(scn, "data/museum.scene")) {
+ return false;
+ }
+
+ /*
datamap_set_path("data");
if(!datamap_load_map("data.map")) {
fprintf(stderr, "failed to load datafile mappings\n");
}
unsigned int sflags = SCNLOAD_FLIPTEX;
- scn = new Scene(&texman);
if(!(scn->load("data/testscene/patoma.fbx", sflags)) ||
!(scn->load("data/testscene/kolones.fbx", sflags))) {
fprintf(stderr, "failed to load test scene\n");
return false;
}
-
- // hardcoded texture assignment hack
- Texture *tex_kolones_lightmap = texman.get_texture("data/testscene/kolones_lighmap.jpg", TEX_2D);
- Texture *tex_patoma_lightmap = texman.get_texture("data/testscene/patomacorona_lightmap.jpg", TEX_2D);
-
- /*
- for(int i=0; i<(int)scn->objects.size(); i++) {
- Object *obj = scn->objects[i];
- if(obj->mtl.name == "WiteMarble") {
- obj->mtl.add_texture(tex_patoma_lightmap, MTL_TEX_LIGHTMAP);
- } else if(obj->mtl.name == "BrownMarble") {
- obj->mtl.add_texture(tex_patoma_lightmap, MTL_TEX_LIGHTMAP);
- } else if(obj->mtl.name == "GiroGiroMarmaro") {
- obj->mtl.add_texture(tex_patoma_lightmap, MTL_TEX_LIGHTMAP);
- } else if(obj->mtl.name == "KentrikoKafeMarmaro") {
- obj->mtl.add_texture(tex_patoma_lightmap, MTL_TEX_LIGHTMAP);
-
- } else if(obj->mtl.name == "SkouroGrizoMarmaro") {
- obj->mtl.add_texture(tex_kolones_lightmap, MTL_TEX_LIGHTMAP);
- } else if(obj->mtl.name == "PalioMarmaro") {
- obj->mtl.add_texture(tex_kolones_lightmap, MTL_TEX_LIGHTMAP);
- }
- }
*/
if(!(sdr = create_program_load("sdr/test.v.glsl", "sdr/test.p.glsl"))) {