Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
squirreltown
Level 9

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
Kinetics Screensavers
0 Kudos
3 Replies
Roku Employee
Roku Employee

Re: roScreen on Ultra

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()
0 Kudos
squirreltown
Level 9

Re: roScreen on Ultra

"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.
Kinetics Screensavers
0 Kudos
Komag
Level 9

Re: roScreen on Ultra

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
0 Kudos