Cool_amigaN wrote:But for a split second it displays the desktop on a small (default, 640x480?) resolution, before going fullscreen.
Yeah, if you don't define bgpic in the display preprocessor, it opens always in 640x480 window first. That's why I put the Hidden=True in my example, to not show the window until we have set what we want as its bgpic (and then show it with OpenDisplay when all is ready).
Maybe this would work. I also "optimized" it a bit to grab directly to brush 2 (no need to have that many copies in memory), and I also added freeing of brushes after we finish with them. Full desktop sized images take some memory after all and it's good to free them if they aren't needed anymore.
Code: Select all
@DISPLAY 1, {Borderless=True, DisableBlanker = True, Hidden = True}
GrabDesktop(2)
BrushToBGPic(2,1)
DisplayBGPic(1)
OpenDisplay(1)
BrushToGray(2)
DisplayBrush(2, 0, 0)
For k = 10 To 100 Step 20
CopyBrush(2, 3)
TintBrush(3, #BLACK, k)
DisplayBrush(3, 0, 0)
Next
BrushToBGPic(3,1)
DisplayBGPic(1)
FreeBrush(2)
FreeBrush(3)