Forum Discussion

squirreltown's avatar
squirreltown
Roku Guru
8 years ago

roScreen on Ultra

on other devices:

roscreen.drawsomething()
roscreen.swapbuffers()

will cause drawsomething to be drawn on top of the not-cleared screen.
On the Ultra i'm seeing it clear the screen as if screen.clear() had been called, when it has not.

4640X  - 8.01.4042-29
  • please don't make any assumptions regarding the status of the drawing buffer after calling .swapBuffers(), it is "dirty" and you should .clear() it before drawing to it (or copy a full-screen background image).

    Depending on hardware, some models re-use a previous frame drawing buffer w/o clearing it - where others start a brand new one (since that's faster for the GPU they have). You can make it rule of thumb - when you do .swapBuffers(), immediately follow with .clear()
  • "RokuNB" wrote:
    Depending on hardware, some models re-use a previous frame drawing buffer w/o clearing it - where others start a brand new one (since that's faster for the GPU they have). 

    Sure 'nuf. Thank you.
  • I have been doing my screen.clear() on the next cycle, before the next draw stuff and screen.swapbuffers()

    FUNCTION drawStuff(gS AS INTEGER, screen, mainRCC, cmpz, cmpz2, hudC, mapC, hitBC1, hitBC2)
    IF m.mAA.doLMap THEN updateLMapPlayer() ELSE spriteManage()
    checkMonStep(gS)
    screen.Clear(&h000000FF)
    drawStuffMulti(gS, screen, mainRCC, cmpz, cmpz2, hudC, mapC, hitBC1, hitBC2)
    screen.SwapBuffers()
    END FUNCTION