/** \brief Initialization for the rendering environment * * This method is invoked *after* the window, renderer and context were * initialized and before the event queue is entered. * This is the place to load any (static) resources, prepare the rendering * environment and preprocessing. * * \param argn number of command-line arguments passed to the application, * including the command. * \param argv array of command-line arguments, including the command itself * as the first element. */ int init(int argn, char **argv) { ilInit(); vfs_registerPath("shader/",REPOSITORY_MASK_SHADER); vfs_registerPath("meshes/",REPOSITORY_MASK_MESH); vfs_registerPath("textures/",REPOSITORY_MASK_TEXTURE); glClearColor(0.1,0.1,0.12,1.0); registerComponent(reloader=new AssetReloader()); Shader *shd=new Shader("mandelbrot"); *reloader+=shd; registerComponent(new ScreenQuad(shd)); return 1; }
void USBMassStorageDevice::begin() { if(!enabled) { USBComposite.clear(); registerComponent(); USBComposite.begin(); enabled = true; } }
void ComponentManager::initialize() { // then settings, since all other components // might have some settings // registerComponent(&SettingsComponent::Get()); registerComponent(&SystemComponent::Get()); registerComponent(&InputComponent::Get()); registerComponent(&DisplayComponent::Get()); registerComponent(&UpdaterComponent::Get()); registerComponent(&RemoteComponent::Get()); registerComponent(&PlayerComponent::Get()); registerComponent(&PowerComponent::Get()); #if KONVERGO_OPENELEC registerComponent(&OESystemComponent::Get()); #endif }
//============================================================================== void Linkage::satisfyCriteria() { std::vector<BodyNode*> bns = mCriteria.satisfy(); while(getNumBodyNodes() > 0) unregisterComponent(mBodyNodes.back()); for(BodyNode* bn : bns) { registerComponent(bn); } update(); }
void EntityManager::registerComponents(const std::vector<ComponentInfo>& Cs) { for (auto C: Cs) registerComponent(C); }
static void registerIt() { registerComponent("SessionManager", new MSWinSessionManager() ); }
static void registerIt() { registerComponent("FontProvider", new MSWinFontProvider() ); }