Paradox Game Engine
v1.0.0 beta06
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Macros
Pages
DelegateRenderer.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
;
4
5
using
SiliconStudio.Core;
6
7
namespace
SiliconStudio.
Paradox
.Effects
8
{
9
/// <summary>
10
/// A processor that updates camera view and projection along the setup of <see cref="RenderTargetSetter"/>
11
/// </summary>
12
public
class
DelegateRenderer
:
Renderer
13
{
14
/// <summary>
15
/// Gets or sets the action to perform when the renderer is loaded.
16
/// </summary>
17
public
Action OnLoad {
get
; set; }
18
19
/// <summary>
20
/// Gets or sets the action to perform when the renderer is unloaded.
21
/// </summary>
22
public
Action OnUnload {
get
; set; }
23
24
/// <summary>
25
/// Gets or sets the action to perform on rendering.
26
/// </summary>
27
public
Action<RenderContext> Render {
get
; set; }
28
29
/// <summary>
30
/// Initializes a new instance of the <see cref="Renderer" /> class.
31
/// </summary>
32
/// <param name="services">The services.</param>
33
public
DelegateRenderer
(
IServiceRegistry
services)
34
: base(services)
35
{
36
}
37
38
public
override
void
Load
()
39
{
40
base.Load();
41
42
var handler = OnLoad;
43
if
(handler != null)
44
handler();
45
}
46
47
public
override
void
Unload
()
48
{
49
base.Unload();
50
51
var handler = OnUnload;
52
if
(handler != null)
53
handler();
54
}
55
56
protected
override
void
OnRendering
(
RenderContext
context)
57
{
58
var handler = Render;
59
if
(handler != null)
60
handler(context);
61
}
62
}
63
}
SiliconStudio.Paradox.Effects.DelegateRenderer.DelegateRenderer
DelegateRenderer(IServiceRegistry services)
Initializes a new instance of the Renderer class.
Definition:
DelegateRenderer.cs:33
SiliconStudio.Paradox.Effects.Renderer
Performs render pipeline transformations attached to a specific RenderPass.
Definition:
Renderer.cs:13
SiliconStudio.Shaders.Parser.System
A system file.
SiliconStudio.Core.IServiceRegistry
A service registry is a IServiceProvider that provides methods to register and unregister services...
Definition:
IServiceRegistry.cs:30
SiliconStudio.Paradox.Effects.DelegateRenderer.OnRendering
override void OnRendering(RenderContext context)
Definition:
DelegateRenderer.cs:56
SiliconStudio.Paradox.Effects.RenderContext
Thread-local storage context used during rendering.
Definition:
RenderContext.cs:12
SiliconStudio.Paradox.Effects.DelegateRenderer.Load
override void Load()
Loads this instance. This method is called when a RenderPass is attached (directly or indirectly) to ...
Definition:
DelegateRenderer.cs:38
SiliconStudio.Paradox.Graphics.Paradox
Paradox image file.
SiliconStudio.Paradox.Effects.DelegateRenderer
A processor that updates camera view and projection along the setup of RenderTargetSetter ...
Definition:
DelegateRenderer.cs:12
SiliconStudio.Paradox.Effects.DelegateRenderer.Unload
override void Unload()
Unloads this instance. This method is called when a RenderPass is de-attached (directly or indirectly...
Definition:
DelegateRenderer.cs:47
sources
engine
SiliconStudio.Paradox.Engine
Effects
DelegateRenderer.cs
Generated on Sat Dec 20 2014 21:51:39 for Paradox Game Engine by
1.8.7