Click or drag to resize
Ab4d.SharpEngine logo

Effect Class

Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.CoreSceneComponent
      Ab4d.SharpEngine.EffectsEffect
        More

Namespace: Ab4d.SharpEngine.Effects
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public abstract class Effect : SceneComponent

The Effect type exposes the following members.

Constructors
 NameDescription
Protected methodEffect Constructor
Top
Properties
 NameDescription
Public propertyIsDefaultEffect Gets a Boolean that specifies if this is the default instance of the specified effect. The default instance renders the objects with default settings and do not allow customizations of effect's properties. The default instance can be get by the static GetDefault method or by GetDefaultT method. To create a custom effect instance use static CreateNew method or CreateNewT(String) method.
Top
Methods
 NameDescription
Public methodApplyRenderingItemMaterial ApplyRenderingItemMaterial method sets the EffectTechnique, MaterialDescriptorSets and StateSortValue properties on the specified renderingItem.
Public methodBeginUpdate BeginUpdate method is called for each registered effect before the SceneNodes and their materials are updated. It can be used to read some data from the RenderingContext (for example CurrentSwapChainImageIndex). It is used with the EndUpdate method to prepare all the data for the next rendered frame. BeginUpdate method internally calls OnBeginUpdate(RenderingContext) method that needs to be implemented by the derived effect.
Protected methodCheckIsDefaultEffect Check if this is a default effect (IsDefaultEffect is true) and in this case throws an exception that it is not allowed to override material properties in this effect instance.
Public methodCleanup Cleanup method checks all memory blocks. Memory block is freed when it is empty and freeEmptyMemoryBlocks is true or when it empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames.
Protected methodDispose
(Overrides ComponentBaseDispose(Boolean))
Public methodDisposeMaterial DisposeMaterial disposes the resources that are used by the specified material. Note that this method can be called on another thread. This happen when it is called called from destructor (finalizer).
Public methodEndUpdate EndUpdate method is called after SceneNodes and their materials are updated. This method can update the material's buffers in case any of the material was changed. EndUpdate method internally calls OnEndUpdate method that needs to be implemented by the derived effect.
Public methodGetDetailsText GetDetailsText adds string that writes details about this Effect into the specified StringBuilder.
Public methodGetMemoryInfo GetMemoryInfo method returns a string that provides information about the memory usage of this effect.
Public methodInitializeMaterial Initializes the material with this effect. This method is called when the specified material is used for the first time. This usually assigns the buffer and an index in the buffer to the material.
Public methodOnBeginUpdate OnBeginUpdate method needs to be implemented by the effect class. The method is called from the BeginUpdate(RenderingContext) method. It can be used to read some data from the RenderingContext (for example CurrentSwapChainImageIndex). It is used with the OnEndUpdate method to prepare all the data for the next rendered frame.
Public methodOnEndUpdate OnEndUpdate method needs to be implemented by the effect class. The method is called from the EndUpdate method. This method can update the material's buffers in case any of the material was changed.
Protected methodOnSwapChainImagesCountChanged OnSwapChainImagesCountChanged is called when the SwapChainImagesCount is changed (increased).
Public methodResetPipelines ResetPipelines is called when RenderPass or some other property of Pipeline is changed so that existing pipelines need to be recreated.
Protected methodResetPipelines(EffectTechnique) ResetPipelines delay disposes all pipelines set to the CurrentPipeline in the specified array of EffectTechniques
Protected methodResetPipelines(StandardEffectTechnique) ResetPipelines delay disposes all pipelines set to the CurrentPipeline in the specified array of EffectTechniques
Protected methodSetMaterialBlock Sets MaterialBlockIndex and MaterialIndex on the specified material.
Public methodToString Returns a String that represents this instance.
(Overrides ObjectToString)
Public methodUpdateMaterial UpdateMaterial method is called when the material is changed and its data need to updated.
Top
See Also
Inheritance Hierarchy