Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to force edit boxes to update to screen? Screenshot render to image problem

Author
Message
pugmartin
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 27th Sep 2017 10:43
Hi there,

I am currently using a large number of edit boxes in my project, and wish to be able to save a screenshot of the screen at some arbitrary point.
Doing so is proving difficult!

I have searched these forums and come across a number of issues taking a screen shot, ie fullscreen view gives a black image etc. I have changed to windowed and seem to be making progress, however my screen is still black, with black text being barely visible. Previously, with the screen fullsize, the text was not visible at all on the black background so... some progress.
My screen when viewed is white however, and I'm having trouble getting this on my screen shot.

I have ultimately tried drawing a white box, then expecting the edit boxes to update onto this, then saving.
I am having no luck:



I believe using Sync() ruins the process yes? And I must manually call Render() etc. To no avail.

Is there a separate call that forces the edit boxes to draw?
Any help on this would be much appreciated as I dont think this has been answered conclusively anywhere?

Thanks!
Martin
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 27th Sep 2017 16:04
Try
Quote: "if GetRawKeyReleased(83) //S"
Click here for VR Legend of Zelda stuff
pugmartin
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 28th Sep 2017 12:31
Hi Mobiius,

Thanks or the reply.
Its not the when to call the code thats in question however - changing the code as you suggest still runs the block of code in the same manner, just changes whether it runs as key is touched or released.
Outcome is the same - program does enter block of code, and output is still a black screen.

Can anyone suggest where I should be looking to get this sorted?
Ultimately - can it be done?
I have a bad feeling I cant get the edit boxes to update to the image when saved...
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th Sep 2017 14:05
AGK double buffers, so try calling update/render/swap then draw your output, then update/render/swap again.
Click here for VR Legend of Zelda stuff
pugmartin
21
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 28th Sep 2017 14:49
Thank you Mobiius much appreciated.

Tried all manner of variations, in the end I've reordered my depths and ended up putting a coloured sprite behind everything.
It works for what I'm after.

Cheers!

Login to post a reply

Server time is: 2024-04-27 00:16:58
Your offset time is: 2024-04-27 00:16:58