Exemple #1
0
        public VirtualTextureSceneViewLink(OgreModelEditorController controller)
        {
            this.controller = controller;

            cameraLink = new CameraLink(controller.SceneViewController);

            CompressedTextureSupport textureFormat = OgreInterface.Instance.SelectedTextureFormat;

            virtualTextureManager = new VirtualTextureManager(UnifiedMaterialBuilder.GetNumCompressedTexturesNeeded(textureFormat), new IntSize2(4096, 4096), 128, 4096, textureFormat, 10, new IntSize2(256, 128), 100 * 1024 * 1024, UnifiedMaterialBuilder.AreTexturesPagedOnDisk(textureFormat));

            materialBuilder = new UnifiedMaterialBuilder(virtualTextureManager, OgreInterface.Instance.SelectedTextureFormat, controller.PluginManager.createLiveResourceManager("UnifiedShaders"));
            OgreInterface.Instance.MaterialParser.addMaterialBuilder(materialBuilder);
        }
Exemple #2
0
        public VirtualTextureSceneViewLink(SceneController sceneController, SceneViewController sceneViewController, PluginManager pluginManager, UpdateTimer timer)
        {
            this.timer = timer;
            timer.addUpdateListener(updateListener);

            this.sceneController = sceneController;

            sceneController.OnSceneLoaded    += SceneController_OnSceneLoaded;
            sceneController.OnSceneUnloading += SceneController_OnSceneUnloading;

            cameraLink = new CameraLink(sceneViewController);

            CompressedTextureSupport textureFormat = OgreInterface.Instance.SelectedTextureFormat;

            virtualTextureManager = new VirtualTextureManager(UnifiedMaterialBuilder.GetNumCompressedTexturesNeeded(textureFormat), new IntSize2(4096, 4096), 128, 4096, textureFormat, 10, new IntSize2(256, 128), 100 * 1024 * 1024, UnifiedMaterialBuilder.AreTexturesPagedOnDisk(textureFormat));

            materialBuilder = new UnifiedMaterialBuilder(virtualTextureManager, OgreInterface.Instance.SelectedTextureFormat, pluginManager.createLiveResourceManager("UnifiedShaders"));
            OgreInterface.Instance.MaterialParser.addMaterialBuilder(materialBuilder);
        }
Exemple #3
0
        public VirtualTextureSceneViewLink(StandaloneController standaloneController)
        {
            this.standaloneController            = standaloneController;
            standaloneController.SceneLoaded    += standaloneController_SceneLoaded;
            standaloneController.SceneUnloading += standaloneController_SceneUnloading;

            cameraLink = new CameraLink(standaloneController.SceneViewController);

            CompressedTextureSupport textureFormat = OgreInterface.Instance.SelectedTextureFormat;

            virtualTextureManager = new VirtualTextureManager(UnifiedMaterialBuilder.GetNumCompressedTexturesNeeded(textureFormat), MedicalConfig.PhysicalTextureSize, MedicalConfig.PageSize, 4096, textureFormat, MedicalConfig.VirtualTextureStagingBufferCount, MedicalConfig.FeedbackBufferSize, MedicalConfig.TextureCacheSize, UnifiedMaterialBuilder.AreTexturesPagedOnDisk(textureFormat));
            virtualTextureManager.MaxStagingUploadPerFrame = MedicalConfig.MaxStagingVirtualTextureUploadsPerFrame;
            virtualTextureManager.TransparentFeedbackBufferVisibilityMask = TransparencyController.TransparentVisibilityMask;
            virtualTextureManager.OpaqueFeedbackBufferVisibilityMask      = TransparencyController.OpaqueVisibilityMask;
            virtualTextureManager.MipSampleBias      = -3;
            virtualTextureManager.AutoAdjustMipLevel = false;

            materialBuilder = new UnifiedMaterialBuilder(virtualTextureManager, OgreInterface.Instance.SelectedTextureFormat, standaloneController.MedicalController.PluginManager.createLiveResourceManager("UnifiedShaders"));
            OgreInterface.Instance.MaterialParser.addMaterialBuilder(materialBuilder);
            TransparencyController.initialize(materialBuilder);

            standaloneController.MainWindow.DestroyInternalResources += MainWindow_DestroyInternalResources;
            standaloneController.MainWindow.CreateInternalResources  += MainWindow_CreateInternalResources;
        }