浏览代码

Update custom-scene-renderers.md

Code was outdated
Eideren 4 年之前
父节点
当前提交
fc84237ca5
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11 9
      en/manual/graphics/graphics-compositor/custom-scene-renderers.md

+ 11 - 9
en/manual/graphics/graphics-compositor/custom-scene-renderers.md

@@ -12,12 +12,13 @@ The @'Stride.Rendering.Compositing.SceneRendererBase' provides a default impleme
 public sealed class MyCustomRenderer : SceneRendererBase
 public sealed class MyCustomRenderer : SceneRendererBase
 {
 {
     // Implements the DrawCore method
     // Implements the DrawCore method
-    protected override void DrawCore(RenderContext context, RenderFrame output)
+    protected override void DrawCore(RenderContext context, RenderDrawContext drawContext)
     {
     {
         // Access to the graphics device
         // Access to the graphics device
-        var graphicsDevice = context.GraphicsDevice;
-        // Clears the currrent render target
-        graphicsDevice.Clear(output.RenderTargets[0], Color.CornflowerBlue);
+        var graphicsDevice = drawContext.GraphicsDevice;
+        var commandList = drawContext.CommandList;
+        // Clears the current render target
+        commandList.Clear(commandList.RenderTargets[0], Color.CornflowerBlue);
         // [...] 
         // [...] 
     }
     }
 }
 }
@@ -29,12 +30,13 @@ To develop a renderer and attach it to a method directly, use @'Stride.Rendering
 
 
 ```cs
 ```cs
 var sceneRenderer = new DelegateSceneRenderer(
 var sceneRenderer = new DelegateSceneRenderer(
-    (renderContext, frame) =>
+    (drawContext) =>
     {
     {
         // Access to the graphics device
         // Access to the graphics device
-        var graphicsDevice = context.GraphicsDevice;
-        // Clears the currrent render target
-        graphicsDevice.Clear(output.RenderTargets[0], Color.CornflowerBlue);
+        var graphicsDevice = drawContext.GraphicsDevice;
+        var commandList = drawContext.CommandList;
+        // Clears the current render target
+        commandList.Clear(commandList.RenderTargets[0], Color.CornflowerBlue);
         // [...] 
         // [...] 
    });
    });
 ```
 ```
@@ -42,4 +44,4 @@ var sceneRenderer = new DelegateSceneRenderer(
 ## See also
 ## See also
 
 
 * [Scene renderers](scene-renderers.md)
 * [Scene renderers](scene-renderers.md)
-* [Debug renderers](debug-renderers.md)
+* [Debug renderers](debug-renderers.md)