Page 1 of 1

Screenshot for transition

Posted: Mon Jul 02, 2018 3:52 pm
by uiblob
Hi,

I have a problem with screenshots and I am not sure what exactly is happening.

You can find the code in the "uiblob" branch on the repository: https://gitlab.com/uiblob/deorum/tree/uiblob

The background: In my scene manager (src/scene.lua) I take a screenshot of the current scene. However the layers seem to be adding up, with some transparency, I have no idea where the transparency comes from. You can watch the behaviour in the issue: https://gitlab.com/uiblob/deorum/issues/3

Scene.lua important functions
Line 53: Scene switch. This is where I take the screenshot.
Line 76: Draw function.

I am out off ideas about the issue. Hopefully you can help.

Greetings,
uiblob

Re: Screenshot for transition

Posted: Tue Jul 03, 2018 3:18 pm
by pgimeno
The transparency comes from onboarding-fullscreen.lua and onboarding-resolution.lua (look for the calls to setColor with 0.5 at the end). It appears that you expect a global colour state of 1,1,1,1 yet you don't reset it after setting it, or push/pop the state.

Re: Screenshot for transition

Posted: Wed Jul 04, 2018 3:24 am
by uiblob
pgimeno wrote: Tue Jul 03, 2018 3:18 pm The transparency comes from onboarding-fullscreen.lua and onboarding-resolution.lua (look for the calls to setColor with 0.5 at the end). It appears that you expect a global colour state of 1,1,1,1 yet you don't reset it after setting it, or push/pop the state.
Wow thank you, of course that's such a dumb error. When I started those modules the scene manager just switched between scenes and didn't do anything else. Gonna test when I am coming home today.

EDIT

Thanks, that was it.