Click or drag to resize
Ab4d.SharpEngine logo

Material Methods

The Material type exposes the following members.

Methods
 NameDescription
Public methodClone Clones the current material with creating a shallow copy of this Material (cloned material has new Id; other properties are copied but referenced objects are preserved).
Protected methodCreateClone
(Overrides InitializedSceneComponentCreateClone)
Public methodDispose Disposes all resources that are used by this material.
Protected methodDispose(Boolean) Releases unmanaged and managed resources (when disposing is true). This method may be called only from the CheckAndDispose(Boolean) method and must not be called manually by the user.
(Overrides ComponentBaseDispose(Boolean))
Public methodGetDetailsText(Boolean, Boolean, Boolean) GetDetailsText return string with details about this Material.
Public methodGetDetailsText(StringBuilder, Boolean, Boolean, Boolean) GetDetailsText adds string that writes details about this Material into the specified StringBuilder.
Protected methodNotifyMaterialBufferChange NotifyMaterialBufferChange sets the MaterialBufferChanged and adds the material to the update queue.
Protected methodNotifyMaterialChange NotifyMaterialBufferChange sets the MaterialChanged, updates the Version number and adds the material to the update queue.
Protected methodNotifyMaterialComplexChange NotifyMaterialBufferChange sets the MaterialComplexChange and adds the material to the update queue.
Protected methodOnEffectChanged OnEffectChanged is called after the effect is changed - overridden methods can return false to prevent the change of effect.
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides InitializedSceneComponentOnInitializeSceneResources(Scene, VulkanDevice))
Protected methodOnMaterialChanged OnMaterialChanged
Public methodProcessMeshDataChannels ProcessMeshDataChannels can be overriden by a derived class to provide logic to process custom mesh data channels (for example, create GpuBuffer for vertex color data).
Public methodRefresh Refresh method regenerates the material and the resources it created.
Protected methodSetMaterialBlock Sets MaterialBlockIndex and MaterialIndex properties. This can be also done by calling protected SetMaterialBlock method from Effect class.
Public methodToString Returns a String that represents this instance.
(Overrides ObjectToString)
Public methodUpdate Update method is called before every rendering and updates the graphics buffers and states objects based on the current value of properties in this Material.
Top
See Also