#include "objmesh.h"
#include "datamap.h"
#include "logger.h"
+#include "metascene.h"
static bool load_material(Scene *scn, Material *mat, const aiMaterial *aimat);
static SceneNode *load_node(Scene *scn, const aiScene *aiscn, unsigned int flags, const aiNode *ainode);
int textype = assimp_textype(aitype);
info_log("loading %s texture: %s\n", assimp_textypestr(aitype), fname);
- Texture *tex = scn->texset->get_texture(fname, TEX_2D);
+ Texture *tex = scn->texset->get_texture(fname, TEX_2D, &scn->datamap);
assert(tex);
mat->textures.push_back(tex);
bool SceneSet::done_scene(Scene *scn)
{
- return scn->load(0, SCNLOAD_STAGE_GL);
+ bool res = scn->load(0, SCNLOAD_STAGE_GL);
+ if(scn->metascn) {
+ scn->metascn->scene_loaded(scn);
+ }
+ return res;
}
void SceneSet::free_scene(Scene *scn)