Click or drag to resize
Ab4d.SharpEngine logo

Effect Methods

The Effect type exposes the following members.

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