Hello Guest

Author Topic: PostRender and Screenshot  (Read 2357 times)

0 Members and 1 Guest are viewing this topic.

Fruckert

  • Member
  • Posts: 60
  • Total Square
    • View Profile
PostRender and Screenshot
« on: August 16, 2014, 09:05:32 PM »
Exactly what it says on the tin.
I've tried doing internally controlled screenshots already, but because I couldn't easily capture the game's surface after everything was rendered, I couldn't figure out how to do it.
This would solve both of these problems.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: PostRender and Screenshot
« Reply #1 on: August 18, 2014, 02:34:07 PM »
Hmm have you tried Game.Instance.Surface.SaveToFile() ?

Fruckert

  • Member
  • Posts: 60
  • Total Square
    • View Profile
Re: PostRender and Screenshot
« Reply #2 on: August 18, 2014, 03:09:15 PM »
Yeah, it returned the clear colour. I think it always fires before the game actually renders to surface.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: PostRender and Screenshot
« Reply #3 on: August 18, 2014, 05:55:02 PM »
Is this on the dev branch?  I think it's one of the things I've fixed recently so that it queues it so it will save to a file at the end of the render.  I'll test it on my end asap

Fruckert

  • Member
  • Posts: 60
  • Total Square
    • View Profile
Re: PostRender and Screenshot
« Reply #4 on: August 18, 2014, 10:32:56 PM »
Oh, this wasn't on the dev branch.
I'll try it again now.
edit: Yup, it's working perfectly. Sorry for not looking first!

Also, might I suggest that the quit key is a Button instead?
It'd be nice to have the option to hook controller buttons to it, mostly for debugging.
« Last Edit: August 18, 2014, 10:48:25 PM by Fruckert »

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: PostRender and Screenshot
« Reply #5 on: August 19, 2014, 12:33:18 AM »
Cool.  I gotta clean up the dev branch this week and push an update to the main branch.  I added the button thing to my list of stuff, we'll see if I can get to it this week!