/// <summary> /// Loads the resource. /// </summary> protected override void LoadResourceInternal(EngineDevice device, ResourceDictionary resources) { _cbPerObject = resources.GetResourceAndEnsureLoaded( _keyConstantBuffer, () => new TypeSafeConstantBufferResource <CBPerObject>()); NeedsRefresh = true; }
/// <summary> /// Unloads the resource. /// </summary> protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources) { _cbPerFrame = null; //resources.RemoveResource(KEY_CONSTANT_BUFFER); }
/// <summary> /// Loads the resource. /// </summary> protected override void LoadResourceInternal(EngineDevice device, ResourceDictionary resources) { _cbPerFrame = resources.GetResourceAndEnsureLoaded( _keyConstantBuffer, () => new TypeSafeConstantBufferResource <CBPerFrame>()); }
/// <summary> /// Unloads the resource. /// </summary> protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources) { _cbPerView = null; _postprocessEffect = null; }
/// <summary> /// Unloads the resource. /// </summary> protected override void UnloadResourceInternal(EngineDevice device, ResourceDictionary resources) { _cbPerObject = null; }