4 using SiliconStudio.Core;
5 using SiliconStudio.Core.Mathematics;
6 using SiliconStudio.Paradox.Graphics;
8 namespace SiliconStudio.
Paradox.Effects
24 if (services == null)
throw new ArgumentNullException(
"services");
28 EffectSystem = services.GetSafeServiceAs<EffectSystem>();
30 DebugName = GetType().Name;
47 return (graphicsDeviceService != null) ? graphicsDeviceService.GraphicsDevice : null;
73 public string DebugName {
get; set; }
80 Pass.StartPass += PassRendering;
88 Pass.StartPass -= PassRendering;
93 if (DebugName != null)
95 context.GraphicsDevice.BeginProfile(Color.Green, DebugName);
101 if (DebugName != null)
103 context.GraphicsDevice.EndProfile();
113 BeginRendering(context);
114 OnRendering(context);
115 EndRendering(context);
Service providing method to access GraphicsDevice life-cycle.
virtual void OnRendering(RenderContext context)
Performs render pipeline transformations attached to a specific RenderPass.
virtual void EndRendering(RenderContext context)
A service registry is a IServiceProvider that provides methods to register and unregister services...
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.
virtual void BeginRendering(RenderContext context)
Thread-local storage context used during rendering.
Renders its RenderSystem.Pipeline, which will usually result in drawing all meshes, UI, etc...
Renderer(IServiceRegistry services)
Initializes a new instance of the Renderer class.
virtual void Unload()
Unloads this instance. This method is called when a RenderPass is de-attached (directly or indirectly...
RenderPass is a hierarchy that defines how to collect and render meshes.
virtual void Load()
Loads this instance. This method is called when a RenderPass is attached (directly or indirectly) to ...