User Tools

Site Tools


code_snippets:psx_scaling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
code_snippets:psx_scaling [2024/10/21 19:02] – [PSX Scaling] mrvalentinecode_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).+  * **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.+  * **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.+  * **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, scaleY, 1.0f); // ! var scaleMatrix = Matrix.CreateScale(scaleX, scaleY, 1.0f); // !
  
Line 80: Line 79:
 } }
 </code> </code>
 +
 +===== 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.1729537329.txt.gz · Last modified: 2024/10/21 19:02 by mrvalentine