Thank you for this - I think you forced me to actually learn something! I think my code is better, but I'm running into the same black screen issue. Now that I'm digging into the documentation, I'm running into this on the roScreen page.
Once an roScreen is created, the display stack enters "Game Mode", and other screen components cannot be used. Screensavers will also be disabled and will appear as a black screen in its place. Other screen components cannot be intermixed with roScreens as the roScreen display stack is maintained independently from the main screen component display stack. When the final roScreen component is closed, other screen components can be used again.
Seems like this might be 'working as intended' for forcing me into Scene Graph territory.
That means that if your main program or currently running channel is based on roScreen it will not be able to create a roScreen as a screensaver. This is annoying and I don't know why that is(still) an issue. I have worked around this by getting the viewers time to screensaver setting and spinning up a scenegraph instance just before the screensaver kicks in and kill the SG instance on screensaver exit... if you don't have a main program you shouldn't need to worry about it. Anyway try this.
function main()
screen=CreateObject("roScreen", true, 1280, 720)
xrl=CreateObject("roUrlTransfer")
xrl.SetUrl("https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png" )
xrl.SetCertificatesFile("common:/certs/ca-bundle.crt")'https requires this
xrl.GetToFile( "tmp:/image.png" )
fs=CreateObject("roFileSystem")
?fs.GetDirectoryListing("tmp:/")'see if the image downloaded
image=CreateObject("roBitmap", "tmp:/image.png")
screen.DrawObject(0, 0, image)
Screen.swapbuffers()
while true:end while
end function
Easier to test as a main program and when you have everything working, change function 'main' to 'runscreensaver'
That was it! Oh man! It actually works now!
I even threw on another while with a sleep so it refreshes every five minutes, and it's been ticking along successfully since last night. Absolute gamechanger.
Thank you so much!