TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IGraphicsContextFactory in Tinman.AddOns.Rendering

Base interface for classes that create IGraphicsContext instances.

interface IGraphicsContextFactory extends IConfigurable
  IEquatable<IGraphicsContextFactory>
  base of GraphicsContextFactory

Attributes

CanCreateGraphicsContext

Can this factory create a graphics context in the current environment?

property CanCreateGraphicsContext { get }
type bool
value true if the graphics context is available, false if not.

Remarks:

The value of this property reflects the environment only, e.g. the availability of native libraries. It does not take into account the current application state, such as the presence of a primary window.

MultiSampling

The multisampling type to use.

property MultiSampling { get set }
type MultiSampleType
value The multisampling type.

Remarks:

The default value is None.

If the given multisampling type is not supported, the closest match will be used.

ShaderEffects

List of directory paths that contain shader effects.

property ShaderEffects { get }
type IVectorConst<Path>
value [not-null] The list of shader effect directory paths.

Remarks:

For each directory path in this list, the RegisterShaderEffects will be called during GetGraphicsContext. Additional shader effects can be registered after creation by calling RegisterShaderEffects.

VerticalSync

Enable vertical sync, if possible?

property VerticalSync { get set }
type bool
value true to enable vertical sync, false to disable it.

Remarks:

The default value is true.

Methods

AddShaderEffects

Adds the given path to the list of shader effect directories.

method AddShaderEffects (Path path)
params path [not-null] Path to a directory that holds shader files.

See also:

ShaderEffects

GetGraphicsContext

Returns the graphics context for the current factory settings.

[OwnerReturn]
method GetGraphicsContext ()
type IGraphicsContext
returns [not-null] The graphics context.

ToConfig

Returns the configuration value that describes this object.

method ToConfig ()
type ConfigValue
returns [not-null] The configuration value.
inherited IConfigurable.ToConfig

Remarks:

All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.

The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.

Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.