Class Effect
Effect abstract base class.
Inherited Members
Namespace: Evergine.Framework.Graphics.Effects
Assembly: Evergine.Framework.dll
Syntax
public abstract class Effect : DisposableObject, ILoadable, IDependencyObject
Constructors
Effect()
Initializes a new instance of the Effect class.
Declaration
public Effect()
Fields
ConstantBufferPool
The effect constant buffer pool.
Declaration
public ConstantBufferPool ConstantBufferPool
Field Value
Type | Description |
---|---|
ConstantBufferPool |
directivesGroups
The directives groups.
Declaration
protected DirectivesGroup[] directivesGroups
Field Value
Type | Description |
---|---|
DirectivesGroup[] |
graphicsContext
The graphics context.
Declaration
public GraphicsContext graphicsContext
Field Value
Type | Description |
---|---|
GraphicsContext |
graphicsResourcesInfo
The graphics resources information.
Declaration
protected GraphicsResourceInfo[] graphicsResourcesInfo
Field Value
Type | Description |
---|---|
GraphicsResourceInfo[] |
passes
The passes.
Declaration
protected string[] passes
Field Value
Type | Description |
---|---|
string[] |
sharedCBufferBySlot
The shared c buffer by slot.
Declaration
protected Dictionary<int, ConstantBuffer> sharedCBufferBySlot
Field Value
Type | Description |
---|---|
Dictionary<int, ConstantBuffer> |
techniquesCached
The techniques cached.
Declaration
protected Dictionary<int, EffectTechnique> techniquesCached
Field Value
Type | Description |
---|---|
Dictionary<int, EffectTechnique> |
Properties
Dependencies
Gets the dependency list.
Declaration
public Lazy<List<IDependencyLink>> Dependencies { get; }
Property Value
Type | Description |
---|---|
Lazy<List<IDependencyLink>> |
Directives
Gets the directive list.
Declaration
public DirectivesGroup[] Directives { get; }
Property Value
Type | Description |
---|---|
DirectivesGroup[] |
EffectType
Gets the effect type.
Declaration
public abstract ShaderAnalyzer.EffectTypes EffectType { get; }
Property Value
Type | Description |
---|---|
ShaderAnalyzer.EffectTypes |
GraphicsResourcesInfo
Gets the ResourceLayout information.
Declaration
public GraphicsResourceInfo[] GraphicsResourcesInfo { get; }
Property Value
Type | Description |
---|---|
GraphicsResourceInfo[] |
Id
Gets or sets the asset Id.
Declaration
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
Guid | The asset path. |
Passes
Gets the passes.
Declaration
public string[] Passes { get; }
Property Value
Type | Description |
---|---|
string[] |
ReaderVersion
Gets the reader version.
Declaration
public Version ReaderVersion { get; }
Property Value
Type | Description |
---|---|
Version | The reader version. |
SharedCBufferBySlot
Gets the shared c buffer by slot.
Declaration
public Dictionary<int, ConstantBuffer> SharedCBufferBySlot { get; }
Property Value
Type | Description |
---|---|
Dictionary<int, ConstantBuffer> |
Methods
CreateSharedResources()
This method must be called after obtain graphicsResourcesInfo and it creates the shared cbuffers.
Declaration
protected void CreateSharedResources()
Destroy()
Destroy all resources of this instance.
Declaration
protected override void Destroy()
Overrides
GetEffectTechnique(string, string[])
Gets Effect Technique with a specific directives group.
Declaration
public abstract EffectTechnique GetEffectTechnique(string passName, string[] activeDirectives)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Pass name. |
string[] | activeDirectives | Active directives. |
Returns
Type | Description |
---|---|
EffectTechnique | Effect technique. |
GetResourceLayout(GraphicsResourceUsage[])
Gets a resource layout.
Declaration
protected ResourceLayout GetResourceLayout(GraphicsResourceUsage[] resourceLayoutUsage)
Parameters
Type | Name | Description |
---|---|---|
GraphicsResourceUsage[] | resourceLayoutUsage | The resource layout usage. |
Returns
Type | Description |
---|---|
ResourceLayout | The resource layout. |
Invalidate(ILoadable)
Invalidates this instance and raise the Invalidated event with the new ILoadable instance.
Declaration
public void Invalidate(ILoadable newInstance)
Parameters
Type | Name | Description |
---|---|---|
ILoadable | newInstance | The new ILoadable instance. |
IsPassRequiredWithDirectives(string, string[])
Gets if the pass is required with current active directives.
Declaration
public abstract bool IsPassRequiredWithDirectives(string passName, string[] activeDirectives)
Parameters
Type | Name | Description |
---|---|---|
string | passName | Pass Name. |
string[] | activeDirectives | Active Directives. |
Returns
Type | Description |
---|---|
bool | If the pass is required or not. |
ReleaseUnusedMemory()
Release unused memory.
Declaration
public void ReleaseUnusedMemory()
Events
Invalidated
Occurs when this instance has been invalidated and all references must be reloaded.
Declaration
public event EventHandler<ILoadable> Invalidated
Event Type
Type | Description |
---|---|
EventHandler<ILoadable> |