Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RenderContext.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 
5 using SiliconStudio.Paradox.Graphics;
6 
7 namespace SiliconStudio.Paradox.Effects
8 {
9  /// <summary>
10  /// Thread-local storage context used during rendering.
11  /// </summary>
12  public class RenderContext
13  {
14  private readonly GraphicsDevice graphicsDevice;
15  private readonly ParameterCollection parameters;
16 
17  public RenderContext(GraphicsDevice graphicsDevice)
18  {
19  this.graphicsDevice = graphicsDevice;
20  parameters = new ParameterCollection("Thread Context parameters");
21  }
22 
23  /// <summary>
24  /// Gets the graphics device.
25  /// </summary>
26  /// <value>The graphics device.</value>
28  {
29  get
30  {
31  return graphicsDevice;
32  }
33  }
34 
35  /// <summary>
36  /// Gets the parameters shared by this instance.
37  /// </summary>
38  /// <value>The parameters.</value>
39  public ParameterCollection Parameters
40  {
41  get
42  {
43  return parameters;
44  }
45  }
46 
47  /// <summary>
48  /// Gets or sets the current pass being rendered.
49  /// </summary>
50  /// <value>The current pass.</value>
51  public RenderPass CurrentPass { get; set; }
52  }
53 }
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class.
Thread-local storage context used during rendering.
RenderContext(GraphicsDevice graphicsDevice)
RenderPass is a hierarchy that defines how to collect and render meshes.
Definition: RenderPass.cs:19
A container to handle a hierarchical collection of effect variables.