Exemple #1
0
/** \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
}
Exemple #4
0
//==============================================================================
void Linkage::satisfyCriteria()
{
    std::vector<BodyNode*> bns = mCriteria.satisfy();
    while(getNumBodyNodes() > 0)
        unregisterComponent(mBodyNodes.back());

    for(BodyNode* bn : bns)
    {
        registerComponent(bn);
    }

    update();
}
Exemple #5
0
	void EntityManager::registerComponents(const std::vector<ComponentInfo>& Cs) {
		for (auto C: Cs)
			registerComponent(C);
	}
Exemple #6
0
 static void
 registerIt() { registerComponent("SessionManager", new MSWinSessionManager() ); }
Exemple #7
0
 static void
 registerIt() { registerComponent("FontProvider", new MSWinFontProvider() ); }