Page 1 of 1

An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 7:48 am
by D0NM
Have you noticed that your .LOVE project window flash white -> black -> white -> black on start?

How to get rid of the flashy stuff?
I just want to have a black screen with a logo w/o unwanted windows flashing.

PS Tested it on Windows10 64bit / AMD

upd: recorded a vid


PS My friend has slightly different flashy effect on his i7 / win7


Guys, do your projects flash on start, too?

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 8:01 am
by easy82
I don't have it on linux. Maybe it's the way Windows reacts when a window is created and then destroyed? Somewhere I've read Love2D does some tests when starting.

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 9:54 am
by Jasoco
Nope. No flashing here. Goes right to the first drawn frame. I'm on OS X.

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 10:05 am
by raidho36
OpenGL window starts out with front buffer filled white. Rendering however produces naturally black background (if you clear canvas alpha to 0 and blit it to output buffer).

I suspect the problem is that there is a lot of things going on before love.load is called. Entire file has to be processed before the framework gets to function, if you define a function to do something it's processed in virtually no time, but if you actually do it that might take a while. Hence the delay between blank OpenGL window pops out and the engine starts rendering into it.

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 10:15 am
by Skeletonxf
By any chance do you have a lot of loading of images/files or modules happening before your first draw frame?

Last time I wanted a splash screen before everything else I delayed all the loading and requiring till after the first draw frame and then let that frame hang while everything loaded.

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 3:36 pm
by D0NM
Thank u guys.
Before posting I've tried to clear the screen in the main.lua love.draw.

The project starts with the white window.
I think it is a windows 10 feature.

Look at this blanky code

Code: Select all

function love.load()
end

function love.draw()
    love.graphics.clear()
    love.graphics.print("HMMMMMMMMMMMMMMMMMM", 10, 0)
end


here is the result

PS My Windows 10 theme is dark.

Also in the 1st video I do use PUSH library that might change the window dimensions.
So we have the 1st flash which happens on an empty project.
And the 2nd flash comes right after the 1st one on changing some window-frame settings.

If you have any ideas, please tell me.

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sat Jan 14, 2017 5:18 pm
by Positive07
Well this may be your driver/SDL2 fault. If I'm not mistaken there was a similar post here in the forums. I'll search for it and report later

Re: An unwanted white screen flash on start of any .LOVE project

Posted: Sun Jan 15, 2017 2:14 pm
by Smoggert
I've had issues like this on my friends AMD carded W10 aswell. AMD's W10 drivers OpenGL implimentation seems to be the cause of many little bugs/artifacts lately, keep them up to date to prevent as much of this as possible.