FBlove - fast software rendering

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

FBlove - fast software rendering

Post 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 225 times
Because of ffi tricks and lack of safety, it works pretty fast
Attachments
tinyrenderer_ch1v2.7z
(212.79 KiB) Downloaded 172 times
test.PNG
test.PNG (132.32 KiB) Viewed 4746 times
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: FBlove - fast software rendering

Post by pgimeno »

Wow, for drawing directly to memory, that's a pretty impressive speed!
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: FBlove - fast software rendering

Post by zorg »

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: 3
Joined: Sun Mar 18, 2018 5:35 am

Re: FBlove - fast software rendering

Post 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 4679 times
dmabrothers
Prole
Posts: 3
Joined: Sun Mar 18, 2018 5:35 am

Re: FBlove - fast software rendering

Post by dmabrothers »

Fixed for love11.1
Attachments
fblove11.1.love
(2.68 KiB) Downloaded 186 times
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 54 guests