Click or drag to resize
AB4D logo

EffectsManagerGetEffectT(Boolean, Boolean) Method

Gets an effect by its type T (by default the type must exactly match the type T and no derived class is matched; this is controller by an optional parameter exactlyMatchType). If the effect was not yet registered by EffectsManager and if createNewEffectInstanceIfNotFound is true, then a new instance of effect T is created, registered with EffectsManager and returned. To get StandardEffect (effect that can render all possible lights), use GetStandardEffect method. NOTE: When the returned effect is not used any more, user must call Dispose (reference count is increased in GetEffect method).

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public virtual T GetEffect<T>(
	bool createNewEffectInstanceIfNotFound = true,
	bool exactlyMatchType = true
)
where T : Effect

Parameters

createNewEffectInstanceIfNotFound  Boolean  (Optional)
if true (by default) and if type T is not found (already registered) then a new instance of the type T is created and registered by EffectsManager
exactlyMatchType  Boolean  (Optional)
when true (by default) the effect type must exactly match the specified type T - no derived class is matched.

Type Parameters

T

Return Value

T
Effect with specified name.
See Also