/// <summary> /// Initializes a new instance of the <see cref="ViewRelatedSceneLayerSubset" /> class. /// </summary> internal ViewRelatedSceneLayerSubset(SceneLayer sceneLayer, ViewInformation viewInformation, ResourceDictionary resources, int viewIndex) { _scene = sceneLayer.Scene; _sceneLayer = sceneLayer; this.ViewInformation = viewInformation; _device = this.ViewInformation.Device !; _resources = resources; ViewIndex = viewIndex; _invalidObjects = new Dictionary <SceneObject, object?>(); _invalidObjectsToDeregister = new Queue <SceneObject>(); // Create temporary collections _tmpChangedVisibilities = new List <Tuple <SceneObject, bool, bool> >(); // Create all specialized render pass lists _objectsPassPlainRender = new PassSubscriptionProperties(); _objectsPassLineRender = new PassSubscriptionProperties(); _objectsPassTransparentRender = new PassSubscriptionProperties(); _objectsPassSpriteBatchRender = new PassSubscriptionProperties(); _objectsPass2DOverlay = new PassSubscriptionProperties(); // Create dictionary for fast access to all render pass list _objectsPerPassDict = new Dictionary <RenderPassInfo, PassSubscriptionProperties> { [RenderPassInfo.PASS_PLAIN_RENDER] = _objectsPassPlainRender, [RenderPassInfo.PASS_LINE_RENDER] = _objectsPassLineRender, [RenderPassInfo.PASS_TRANSPARENT_RENDER] = _objectsPassTransparentRender, [RenderPassInfo.PASS_SPRITE_BATCH] = _objectsPassSpriteBatchRender, [RenderPassInfo.PASS_2D_OVERLAY] = _objectsPass2DOverlay }; _objectsPerPass = new List <PassSubscriptionProperties>(_objectsPerPassDict.Values); _anythingUnsubscribed = false; // Create and load all render pass relevant resources this.RefreshDeviceDependentResources(); }
/// <summary> /// Sets some informational data telling the filter where it is used. /// </summary> /// <param name="layerToFilter">The SceneLayer that gets filtered.</param> /// <param name="viewInformation">The information object of the corresponding view.</param> public virtual void SetEnvironmentData(SceneLayer layerToFilter, ViewInformation viewInformation) { }
/// <summary> /// Sets the order id of the given layer. /// </summary> /// <param name="layerObject">The layer object.</param> /// <param name="oderId">The order id to set.</param> public void SetLayerOrderId(SceneLayer layerObject, int oderId) { this.CheckValid(); this.Owner.SetLayerOrderId(layerObject, oderId); }
/// <summary> /// Clears the given layer. /// </summary> /// <param name="layer">The layer to be cleared.</param> public void ClearLayer(SceneLayer layer) { this.CheckValid(); this.Owner.ClearLayer(layer); }
/// <summary> /// Removes the given layer from the scene. /// </summary> /// <param name="layer">Layer to remove.</param> public void RemoveLayer(SceneLayer layer) { this.CheckValid(); this.Owner.RemoveLayer(layer); }