commit x64 compilation from lulu cause the other branch dont seems to compile properly at home
This commit is contained in:
33
include/engine/scene3d/scene_preloader.cpp
Normal file
33
include/engine/scene3d/scene_preloader.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#include "scene3d/scene.h"
|
||||
#include "core/render_resource_factory.h"
|
||||
|
||||
using namespace GS::S3D;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool Scene::PreloadResources(GS::Render::ResourceFactory &rf, const char *uri)
|
||||
{
|
||||
__LOG_H__ << "Preloading scene '" << uri << "' resources.\n";
|
||||
|
||||
using namespace GS::NML;
|
||||
|
||||
File file;
|
||||
if (!Parser::Load(uri, file))
|
||||
return false;
|
||||
|
||||
if (Tag *items = file.GetTag("Scene:Items;"))
|
||||
{
|
||||
NMLTagForeach(t, *items)
|
||||
if (t->name == "MObject")
|
||||
if (Tag *g = t->GetTypedTag("Object:Geometry;", Variant::VariantString))
|
||||
rf.LoadGeometry(g->GetString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user