So I am trying to take a screenshot of the current situation during the PlayState of the game and when the player pauses the game I want the game to take a "screenshot" save it in memory and not as a file and use it as the background for the pause screen. Any ideas because I have no clue.
1 Answer
Keep rendering the game. just pause the logic!
You can esily just attach a "pause" pass, that will render the framebuffer and then blur it or what not, and after that add some gui! should be really straight forward.
The only reason i can imagine why you would like to take a screenshot is to not use all the gpu power and reduce lag when you are pausing. Which is a valid point, but you should be fairly okay with just removing the cpu power being used. And for this approach, i would just ask for the last rendered frame buffer inside the game loop, and from there just do what ever i want with it. that should give you the desired effect.
-
\$\begingroup\$ Could you tell me how to blur the screen? \$\endgroup\$ Commented Apr 11, 2014 at 20:30
-
\$\begingroup\$ Well, basically you read pixels next to the original one and average that value out. if you google gaussian blur or something you will find a lot of examples out there. \$\endgroup\$– TordinCommented Apr 14, 2014 at 6:25