Page 1 of 1

FBlove - fast software rendering

Posted: Sun Mar 18, 2018 7:41 am
by dmabrothers
I always liked simplicity of framebuffer , so i created small library for drawing directly on imagedata.

Code: Select all

fb=require 'fblove_strip'(w,h) 
function love.draw()
 fb.fill(0xFFaa00aa)
 
 for y=0,h-1 do for x=0,w-1do
   fb.buf[y][x]=0xFFFF0000+x*y 
 end end
  
  fb.refresh()
  fb.draw(0,0,1) 
end	
fblove.love
(2.66 KiB) Downloaded 226 times
Because of ffi tricks and lack of safety, it works pretty fast

Re: FBlove - fast software rendering

Posted: Sun Mar 18, 2018 10:42 am
by pgimeno
Wow, for drawing directly to memory, that's a pretty impressive speed!

Re: FBlove - fast software rendering

Posted: Sun Mar 18, 2018 6:18 pm
by zorg
It does seem to consume a lot of cpu though, but cool nevertheless!

Re: FBlove - fast software rendering

Posted: Sun Mar 18, 2018 8:53 pm
by dmabrothers
It uses not so match CPU for drawing: on reasonable resolutions, performance limited by image:refresh() (~40% cpu)

Text renderer with BDF fonts and unicode support
screen from Samsung Galaxy Y GT-S5360. 832mhz arm6 :)
fbdump.png
fbdump.png (12.85 KiB) Viewed 4721 times

Re: FBlove - fast software rendering

Posted: Wed May 02, 2018 7:17 pm
by dmabrothers
Fixed for love11.1