Class DefaultUniformProvider
- Namespace
- Frent
- Assembly
- Frent.dll
The default uniform provider, using a dictionary.
public class DefaultUniformProvider : IUniformProvider
- Inheritance
-
DefaultUniformProvider
- Implements
- Inherited Members
Methods
Add(Type, object)
Adds a uniform to this uniform provider.
public DefaultUniformProvider Add(Type type, object @object)
Parameters
Returns
- DefaultUniformProvider
This instance, for method chaining.
Exceptions
- ArgumentException
object
is not assignable totype
.
Add<T>(T)
Adds a uniform to this uniform provider.
public DefaultUniformProvider Add<T>(T obj) where T : notnull
Parameters
obj
TThe object to add as a uniform.
Returns
- DefaultUniformProvider
This instance, for method chaining.
Type Parameters
T
The type of uniform to add.
GetUniform<T>()
Gets a uniform from this default uniform provider.
public T GetUniform<T>()
Returns
- T
The uniform instance.
Type Parameters
T
The type of uniform to get.
Exceptions
- InvalidOperationException
The uniform of the specified type is not found.