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
SkyboxRenderer.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
4
using
SiliconStudio.Core;
5
using
SiliconStudio.Paradox.Graphics;
6
7
namespace
SiliconStudio.
Paradox
.Effects.Modules.Renderers
8
{
9
public
class
SkyboxRenderer
:
Renderer
10
{
11
private
TextureCube
skybox;
12
13
private
Effect
skyboxEffect;
14
15
public
SkyboxRenderer
(
IServiceRegistry
services,
TextureCube
skyboxTexture)
16
: base(services)
17
{
18
skybox = skyboxTexture;
19
}
20
21
public
override
void
Load
()
22
{
23
base.Load();
24
25
skyboxEffect = EffectSystem.LoadEffect(
"SkyboxShader"
);
26
skyboxEffect.Parameters.Set(TexturingKeys.TextureCube0, skybox);
27
}
28
29
public
override
void
Unload
()
30
{
31
base.Unload();
32
33
skyboxEffect.Dispose();
34
}
35
36
protected
override
void
OnRendering
(
RenderContext
context)
37
{
38
GraphicsDevice.SetDepthStencilState(GraphicsDevice.DepthStencilStates.DepthRead);
39
skyboxEffect.Apply(context.CurrentPass.Parameters);
40
GraphicsDevice.DrawQuad();
41
}
42
}
43
}
SiliconStudio.Paradox.Effects.Modules.Renderers.SkyboxRenderer.SkyboxRenderer
SkyboxRenderer(IServiceRegistry services, TextureCube skyboxTexture)
Definition:
SkyboxRenderer.cs:15
SiliconStudio.Paradox.Graphics.TextureCube
A TextureCube frontend to SharpDX.Direct3D11.Texture2D.
Definition:
TextureCube.cs:37
SiliconStudio.Paradox.Effects.Modules.Renderers.SkyboxRenderer.OnRendering
override void OnRendering(RenderContext context)
Definition:
SkyboxRenderer.cs:36
SiliconStudio.Paradox.Effects.Renderer
Performs render pipeline transformations attached to a specific RenderPass.
Definition:
Renderer.cs:13
SiliconStudio.Paradox.Effects.Modules.Renderers.SkyboxRenderer.Unload
override void Unload()
Unloads this instance. This method is called when a RenderPass is de-attached (directly or indirectly...
Definition:
SkyboxRenderer.cs:29
SiliconStudio.Core.IServiceRegistry
A service registry is a IServiceProvider that provides methods to register and unregister services...
Definition:
IServiceRegistry.cs:30
SiliconStudio.Paradox.Effects.Modules.Renderers.SkyboxRenderer.Load
override void Load()
Loads this instance. This method is called when a RenderPass is attached (directly or indirectly) to ...
Definition:
SkyboxRenderer.cs:21
SiliconStudio.Paradox.Effects.RenderContext
Thread-local storage context used during rendering.
Definition:
RenderContext.cs:12
SiliconStudio.Paradox.Effects.Modules.Renderers.SkyboxRenderer
Definition:
SkyboxRenderer.cs:9
SiliconStudio.Paradox.Graphics.Paradox
Paradox image file.
SiliconStudio.Paradox.Graphics.Effect
Definition:
Effect.cs:19
sources
shaders
Renderers
SkyboxRenderer.cs
Generated on Sat Dec 20 2014 21:52:14 for Paradox Game Engine by
1.8.7