Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Roku Guru

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 3
RokuNB
Roku Guru

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
Roku Guru

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
Roku Guru

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