Dirty Rectangle (Combined Video & Fx Rendering)

Started by kevin, March 19, 2010, 06:59:02 AM

Previous topic - Next topic

kevin

 Dirty Rectangles  (Combined Video & Fx Rendering)

   This demo make simple scrolling backdrop with overlaid alpha blended circle over the top.   Rather than drawing the entire scene to an FX buffer, then copying this down to the PB screen,  we're drawing everything to the Pb screen, then overlaying the transparent circle.    This greatly reduces the work load the program has to do and is obviously quicker.     So the moral of the day is "think then act!"


   Press SPACE to toggle the frame rate cap.


Video:





Related To

 A Crash Course In Optimization


Download:

    Attached

stevmjon

thanks kev,

this makes an amazing difference. how do you come up with these ideas?

stevmjon
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin


it's not my idea, it's been used in game engines for decades

stevmjon

well, i am certainly glad you are sharing these ideas, and many others, to the playbasic community.

stevmjon
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin

#4
  There's nothing new here, as all the technical info can be found in ->   Economizing Image Blitting (drawing!) - How well you understand it, will directly impact on the solutions you write.