Skip to content

Commit

Permalink
Resolves #61 - remove remaining windows phone references
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDarksideJ authored Sep 10, 2024
1 parent 8ae6871 commit 5657514
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The graphics pipeline has a default render target called the **back buffer**, wh
To use a render target, create a [RenderTarget2D](xref:Microsoft.Xna.Framework.Graphics.RenderTarget2D) object with the width, height, and other options you prefer. Call [GraphicsDevice.SetRenderTarget](/api/Microsoft.Xna.Framework.Graphics.GraphicsDevice.html#Microsoft_Xna_Framework_Graphics_GraphicsDevice_SetRenderTarget_Microsoft_Xna_Framework_Graphics_RenderTarget2D_) to make your render target the current render target. Any subsequent **Draw** calls you make will draw into your render target rather than the back buffer. When you are finished rendering, call [GraphicsDevice.SetRenderTarget](/api/Microsoft.Xna.Framework.Graphics.GraphicsDevice.html#Microsoft_Xna_Framework_Graphics_GraphicsDevice_SetRenderTarget_Microsoft_Xna_Framework_Graphics_RenderTarget2D_) and pass it null to set the device to render to the back buffer again.

There are other considerations for choosing width and height when you create a render target. For example, you should choose the width and height of the back buffer to match the size of your game window (although Windows Phone scales the final result to match the user's screen). This prevents any resizing when the back buffer is copied to the screen. However, an offscreen render target does not need to have the same width and height as the back buffer. The final image can be rendered in several small render targets and then reassembled in a larger render target.
There are other considerations for choosing width and height when you create a render target. For example, you should choose the width and height of the back buffer to match the size of your game window (althoughmost mobiles scale the final result to match the user's screen). This prevents any resizing when the back buffer is copied to the screen. However, an offscreen render target does not need to have the same width and height as the back buffer. The final image can be rendered in several small render targets and then reassembled in a larger render target.

A render target has a surface format, which describes how many bits are allocated to each pixel, and how they are divided between red, green, blue, and alpha. For example, [SurfaceFormat.Bgr565](https://monogame.net/api/Microsoft.Xna.Framework.Graphics.SurfaceFormat.html) allocates 16 bits per pixel; 5 bits for blue and red and 6 bits for green.

Expand Down
2 changes: 1 addition & 1 deletion articles/getting_to_know/whatis/graphics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The topics in this section describe the graphical conventions used by MonoGame i

* [What Is a Configurable Effect?](WhatIs_ConfigurableEffect.md)

This comment has been minimized.

Copy link
@dellis1972

dellis1972 Sep 10, 2024

Contributor

@SimonDarksideJ can we change these ConfigurableEffect naming? Its not something I've ever seen. I prefer "Built In".


A configurable effect is an optimized rendering effect designed for Windows Phone. A configurable effect is created using a built-in object with options for user configuration.
MonoGame ships with a number of built in effects. These effects have properties so you can use to change behaviour or switch features on or off.

* [What Is a Depth Buffer?](WhatIs_DepthBuffer.md)

Expand Down

0 comments on commit 5657514

Please sign in to comment.