"EnTerr" wrote:
"TheEndless" wrote:
A region effectively just offsets your x and y and clips draws to the width and height of the region. Otherwise it's identical to drawing directly to the bitmap/screen. Using a region of roScreen would result in the same "hall-o-mirrors" effect.
The point is to address the overscan issue at large, not the infini-mirror symptom. Avoid drawing to a bitmap first and then copy to screen. I was thinking
scr = createObject("roScreen", ...)
if should_compensate_for_overscan:
'trim 5% on each side
scr = createObject("roRegion", scr, 1280 * 0.05, 720 * 0.05, 1280 * 0.90, 720 * 0.90)
end if
Now that takes care of the translation and i don't know if roRegion has any built-in means for scaling when drawn *to*?
This would give you an overscan adjusted region to draw to, but aside from giving you a target, it doesn't help with scaling. Going this route would require scaling all of the bitmaps either before or while drawing to the region. Since it sounds like Komag is using the compositor, that would cause a real headache, as it would require scaling the sprites when you create them. If he can afford the performance hit from drawing to a full screen bitmap and scaling that down instead, that's a far easier route to take.
"EnTerr" wrote:
Alternatively, is DrawScaledObject(x, y, 1, 1, bmp) notably slower than DrawObject(x, y, bmp) (i.e. if DrawScaledObject is optimized not to do any math for 1:1 "scaling"... i think you know where i am heading with that) ?
I haven't tested this in a long time, but my framework code explicitly checks for a 1.0 scaling factor, so I'm guessing I saw a significant enough difference between DrawObject and DrawScaledObject, even at 1:1, that I optimized it in my code.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)