code_snippets:psx_scaling
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
code_snippets:psx_scaling [2024/10/21 19:02] – [The Goal] mrvalentine | code_snippets:psx_scaling [2024/10/21 20:12] (current) – [Draw()] woops mrvalentine | ||
---|---|---|---|
Line 9: | Line 9: | ||
Here's a step-by-step guide: | Here's a step-by-step guide: | ||
- | * Create a Render Target: Define a render target with your desired lower resolution (e.g., 640x480). | + | |
- | * Render Your Scene: Draw your game scene to the render target. | + | |
- | * Scale and Draw to Back Buffer: Draw the render target to the back buffer with scaling to fit the 720x480 resolution. | + | |
===== Fields ===== | ===== Fields ===== | ||
Line 68: | Line 68: | ||
// Set up the viewport and scaling matrix | // Set up the viewport and scaling matrix | ||
- | var viewport = new Viewport(0, 0, 720, 480); // ! | ||
var scaleMatrix = Matrix.CreateScale(scaleX, | var scaleMatrix = Matrix.CreateScale(scaleX, | ||
Line 80: | Line 79: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ===== Closing Remarks ===== | ||
+ | |||
+ | To perform full screen switches I came across an issue which I had resolved just about, let me know on the community discord if I should add that here. | ||
+ |
code_snippets/psx_scaling.1729537361.txt.gz · Last modified: 2024/10/21 19:02 by mrvalentine