update the backed render target docs
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f17c6db590
commit
bfacdc8f95
|
@ -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.
|
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
|
```cs
|
||||||
var myRenderTarget = RenderTarget.CreateBackedColorTarget2D(
|
var myRenderTarget = RenderTarget.CreateBackedRenderTarget(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
1280,
|
1280,
|
||||||
720,
|
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
|
```cs
|
||||||
var depthBuffer = RenderTarget.CreateDepthBuffer(
|
var depthBuffer = RenderTarget.CreateBackedRenderTarget(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
1280,
|
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(
|
var depthStencilBuffer = RenderTarget.CreateDepthStencilBuffer(
|
||||||
GraphicsDevice,
|
GraphicsDevice,
|
||||||
1280,
|
1280,
|
||||||
720
|
720,
|
||||||
|
TextureFormat.D32S8,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue