diff --git a/content/Graphics/Resources/RenderTarget.md b/content/Graphics/Resources/RenderTarget.md index 06cf744..e133b2a 100644 --- a/content/Graphics/Resources/RenderTarget.md +++ b/content/Graphics/Resources/RenderTarget.md @@ -28,7 +28,7 @@ When we use a texture slice to create a render target, we say that the render ta A lot of the time you will be creating render targets and textures at the same time. We have a nice shortcut for that. ```cs -var myRenderTarget = RenderTarget.CreateBackedColorTarget2D( +var myRenderTarget = RenderTarget.CreateBackedRenderTarget( GraphicsDevice, 1280, 720, @@ -64,13 +64,15 @@ var depthBuffer = new RenderTarget( ); ``` -This sets up a 1280x720 32-bit depth buffer. Guess what - we have a shortcut for that too! +This sets up a 1280x720 32-bit depth buffer. We can also use our above-mentioned method to do the same thing. ```cs -var depthBuffer = RenderTarget.CreateDepthBuffer( +var depthBuffer = RenderTarget.CreateBackedRenderTarget( GraphicsDevice, 1280, - 720 + 720, + TextureFormat.D32, + false ); ``` @@ -80,6 +82,8 @@ One last thing to note - depth buffers can also contain a "stencil buffer". Sten var depthStencilBuffer = RenderTarget.CreateDepthStencilBuffer( GraphicsDevice, 1280, - 720 + 720, + TextureFormat.D32S8, + false ); ```