abstract class
|
ShaderTechnique
|
extends
|
Disposable
|
||
implements
|
IShaderTechnique
|
Returns the lifecycle state of this object.
public
virtual
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
The name of this shader technique.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The technique. name. | |
implements
|
IShaderTechnique.Name
|
The number of rendering passes of this technique.
public
property
|
PassCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of rendering passes. | |
implements
|
IShaderTechnique.PassCount
|
Returns the names of all passes of this technique.
public
property
|
PassNames
{
get
}
|
||
type
|
string[]
|
||
value
|
|
The list of technique pass names. | |
implements
|
IShaderTechnique.PassNames
|
See also:
IShaderTechnique.PassAcquires a strong reference to this disposable object.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
AcquireTry
()
|
|||
type
|
IDisposable
|
|||
returns
|
this
if
a
new
strong
reference
has
been
acquired,
null
if
this
object
is
already
being
disposed.
|
|||
inherited
|
Disposable.AcquireTry
|
Remarks:
The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Manually enables or disables alpha-to-coverage, if supported.
public
abstract
method
|
AlphaToCoverage
(bool value)
|
||
type
|
bool
|
||
params
|
value
|
true
to
enable
alpha-to-coverage,
false
to
disable
it.
|
|
returns
|
true
if
alpha-to-coverage
has
been
enabled,
false
in
one
of
these
cases:
|
||
implements
|
IRenderState.AlphaToCoverage
|
Remarks:
If a render API does not support setting the alpha-to-coverage state in the shader effect source, this method can be used to enable it from code.
See also:
IShaderTechnique.BeginPassBegins an access to this object.
public
abstract
method
|
Begin
()
|
||
implements
|
IBeginEnd.Begin
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndBegins to render using the given pass of this technique.
public
abstract
method
|
BeginPass
(int32 pass = 0)
|
||
params
|
pass
|
[0..PassCount-1]
|
Index
of
rendering
pass.
Defaults
to
0 . |
implements
|
IShaderTechnique.BeginPass
|
Remarks:
Render state can only be modified via IRenderState between calls of BeginPass and EndPass.
See also:
IShaderEffect.ApplyChangesThe cull mode to use for rendering primitives.
public
abstract
method
|
CullMode
(int32 mode)
|
||
params
|
mode
|
The
cull
mode:
<
0 :
invert
cull
mode
of
technique.
>
0 :
keep
cull
mode
of
technique.
=
0 :
disable
culling.
|
|
implements
|
IRenderState.CullMode
|
See also:
IShaderTechnique.BeginPassReleases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.
[Dispose, OwnerThis, ThreadSafe]
|
||||
public
method
|
Dispose
()
|
|||
inherited
|
Disposable.Dispose
|
Remarks:
The Dispose method silently returns if the object has already been disposed.
Ends the current access to this object.
public
abstract
method
|
End
()
|
||
implements
|
IBeginEnd.End
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndEnds rendering of the current pass.
public
abstract
method
|
EndPass
()
|
||
implements
|
IShaderTechnique.EndPass
|
See also:
IShaderEffect.ApplyChangesChecks if a render pass of the given name exists.
[Pure]
|
||||
public
method
|
HasPass
(string name)
|
|||
type
|
bool
|
|||
params
|
name
|
[not-empty]
|
The shader technique render pass name. | |
returns
|
true
if
the
render
pass
exists,
false
if
not. |
|||
implements
|
IShaderTechnique.HasPass
|
Returns a render pass of this shader technique by its name.
[Pure]
|
||||
public
method
|
Pass
(string name)
|
|||
type
|
ShaderPass
|
|||
params
|
name
|
[not-null]
|
The shader technique render pass name. | |
returns
|
|
The render pass. | ||
implements
|
IShaderTechnique.Pass
|
See also:
IShaderTechnique.HasPassExceptions:
Returns a render pass of this shader technique by its index.
[Pure]
|
||||
public
method
|
PassAt
(int32 index)
|
|||
type
|
ShaderPass
|
|||
params
|
index
|
The shader technique pass index. | ||
returns
|
|
The render pass. | ||
implements
|
IShaderTechnique.PassAt
|
Exceptions:
Creates a new instance of ShaderTechnique.
protected
constructor
|
ShaderTechnique
(string name)
|
||
params
|
name
|
[not-empty]
|
The technique name. |
Adds a render pass.
protected
method
|
Add
(ShaderPass pass)
|
||
params
|
pass
|
[not-null]
|
The render pass. |
Remarks:
Subclasses call this method to populate the shader technique.
Disposes the managed resources held by a concrete subclass. This method will be called at most once per subclass.
protected
override
method
|
DisposeManaged
()
|
||
overrides
|
Disposable.DisposeManaged
|
Remarks:
This method will only be called when a disposable object is explicitly destroyed by user code calling the Dispose method. It will not be called when the object is collected as garbage by the system.
Overriding methods must call the DisposeManaged method of their base class. The base call should be the last statement.
The DisposeManaged method is called before the DisposeUnmanaged method.
Disposes the unmanaged resources held by a concrete subclass. This method will be called exactly once per subclass.
protected
virtual
method
|
DisposeUnmanaged
()
|
||
inherited
|
Disposable.DisposeUnmanaged
|
Remarks:
Overriding methods must call the DisposeUnmanaged method of their base class. The base call should be the last statement.
The DisposeUnmanaged method is called after the DisposeManaged method.