CG3DBinaryLoader::CG3DBinaryLoader(CG3DGraphics* graphics) : m_CurrFP(NULL), m_Graphics(graphics) { if (s_Mgr == NULL) { s_Mgr = new CG3DBinaryManager(); s_Mgr->SetWeakPtr((CG3DRefCount**)&s_Mgr); } s_Mgr->AddRef(); AddHandler(IDENT('T','E','X','T'),new TextureHandler()); AddHandler(IDENT('E','F','C','T'),new EffectHandler()); AddHandler(IDENT('M','A','T',' '),new MaterialHandler()); AddHandler(IDENT('M','O','D','L'),new ModelHandler()); AddHandler(IDENT('S','C','E','N'),new SceneHandler()); AddHandler(IDENT('G','O','B',' '),new GOBHandler()); AddModuleHandler("scene.simple",new SimpleSceneHandler()); AddModuleHandler("dummy",new DummyModuleHandler()); AddModuleHandler("model",new ModelModuleHandler()); AddModuleHandler("camera",new CameraModuleHandler()); AddModuleHandler("frameM",new FrameMModuleHandler()); AddModuleHandler("framePRS",new FramePRSModuleHandler()); AddModuleHandler("framePQS",new FramePQSModuleHandler()); AddModuleHandler("frameIdent",new FrameIdentModuleHandler()); }
ModuleHandlerAdder(const char* name, ModuleHandlerData::FuncType function) { ModuleHandlerData data; data.Name = name; data.Function = function; AddModuleHandler(data); }