Click or drag to resize
DigitalRuneRenderContext Class
Provides information about the current render states.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsRenderContext

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class RenderContext

The RenderContext type exposes the following members.

Constructors
  NameDescription
Public methodRenderContext
Initializes a new instance of the RenderContext class.
Top
Methods
  NameDescription
Public methodClone
Creates a new RenderContext that is a clone of the current instance.
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified RenderContext.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the RenderContext derived class.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReset
Resets the render context to default values.
Public methodSet
Copies the properties of the specified render context.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCameraNode
Gets or sets the active camera.
Public propertyData
Gets a generic collection of name/value pairs which can be used to store custom data.
Public propertyDeltaTime
Gets the elapsed time since the last frame.
Public propertyFrame
Gets or sets the number of the current frame.
Public propertyGBuffer0
Gets or sets the first texture containing G-buffer data.
Public propertyGBuffer1
Gets or sets the second texture containing G-buffer data.
Public propertyGBuffer2
Gets or sets the third texture containing G-buffer data.
Public propertyGBuffer3
Gets or sets the fourth texture containing G-buffer data.
Public propertyGraphicsService
Gets or sets the graphics service.
Public propertyLightBuffer0
Gets or sets the first texture containing light buffer data.
Public propertyLightBuffer1
Gets or sets the first texture containing light buffer data.
Public propertyLodBias
Gets or sets the global LOD bias.
Public propertyLodBlendingEnabled
Gets or sets a value indicating whether smooth LOD transitions are enabled.
Public propertyLodCameraNode
Gets or sets the camera that is used as reference for LOD calculations.
Public propertyLodHysteresis
Gets or sets the LOD hysteresis, which is the distance over which an object transitions from on level of detail to the next level. (Needs to be normalized - see remarks.)
Public propertyMaterialBinding
Gets or sets the effect binding of the current material.
Public propertyMaterialInstanceBinding
Gets or sets the effect binding of the current material instance.
Public propertyObject
Gets or sets the current data object.
Public propertyPassIndex
Gets or sets the index of the current EffectPass.
Public propertyPresentationTarget
Gets or sets the PresentationTarget that is currently being rendered.
Public propertyReferenceNode
Gets or sets a scene node that provides additional context for the current render operation.
Public propertyRenderPass
Gets or sets a string that identifies the current render pass.
Public propertyRenderTarget
Gets or sets the target of the current rendering operations.
Public propertyScene
Gets or sets the scene.
Public propertySceneNode
Gets or sets the currently rendered scene node.
Public propertySceneTexture
Gets or sets the texture that contains the rendered scene.
Public propertyScreen
Gets or sets the GraphicsScreen that is currently being rendered.
Public propertySourceTexture
Gets or sets the source texture that contains the source image for the current render operation.
Public propertyTechnique
Gets or sets a string that identifies the current technique.
Public propertyTime
Gets the total elapsed time.
Public propertyUserData
Gets or sets a user-defined object.
Public propertyViewport
Gets the viewport (= the portion of the back buffer that should be used for rendering).
Top
Remarks

The RenderContext is passed to every Render method. It is used to pass information to a renderer, and it should contain all information that is required to render an object or to perform a rendering step.

Additional information can be stored in the Data dictionary.

Cloning:
The render context is cloneable. Clone makes a copy of the current render context. The new instance contains a new Data dictionary. The properties and the contents of the Data dictionary are copied by reference (shallow copy).

See Also