FBlove - fast software rendering

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
dmabrothers
Prole
Posts: 2
Joined: Sun Mar 18, 2018 5:35 am

FBlove - fast software rendering

Post by dmabrothers » Sun Mar 18, 2018 7:41 am

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 40 times
Because of ffi tricks and lack of safety, it works pretty fast
Attachments
tinyrenderer_ch1v2.7z
(212.79 KiB) Downloaded 18 times
test.PNG
test.PNG (132.32 KiB) Viewed 585 times

User avatar
pgimeno
Party member
Posts: 1008
Joined: Sun Oct 18, 2015 2:58 pm

Re: FBlove - fast software rendering

Post by pgimeno » Sun Mar 18, 2018 10:42 am

Wow, for drawing directly to memory, that's a pretty impressive speed!

User avatar
zorg
Party member
Posts: 2202
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: FBlove - fast software rendering

Post by zorg » Sun Mar 18, 2018 6:18 pm

It does seem to consume a lot of cpu though, but cool nevertheless!
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

dmabrothers
Prole
Posts: 2
Joined: Sun Mar 18, 2018 5:35 am

Re: FBlove - fast software rendering

Post by dmabrothers » Sun Mar 18, 2018 8:53 pm

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 518 times

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests