Is there a way draw raw data in real time?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
alejandroalzate
Citizen
Posts: 67
Joined: Sat May 08, 2021 9:45 pm

Is there a way draw raw data in real time?

Post by alejandroalzate »

Hi wanted to ask there's a way to push a lot of raw pixels from a table in real time?

The input is a table with raw value from 0 to 1,
The joke is pushing a grid of pixel calling

Code: Select all

love.graphics.points()
on every table item on every

Code: Select all

love.draw()
call

Code: Select all

target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
User avatar
BrotSagtMist
Party member
Posts: 614
Joined: Fri Aug 06, 2021 10:30 pm

Re: Is there a way draw raw data in real time?

Post by BrotSagtMist »

Uhm yes? You can draw pixels.
Honestly what even is the question here?
obey
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Is there a way draw raw data in real time?

Post by zorg »

You'd be better off using an ImageData, and updating an Image with its contents each frame with :replacePixels.
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.
User avatar
UnixRoot
Citizen
Posts: 80
Joined: Mon Nov 08, 2021 8:10 am

Re: Is there a way draw raw data in real time?

Post by UnixRoot »

zorg wrote: Wed Jun 21, 2023 5:17 am You'd be better off using an ImageData, and updating an Image with its contents each frame with :replacePixels.
This, and using FFI pointers and C structs, for a huge performance boost.

It's fast enough for FullHD software rendering with 300+ FPS, even on my potato PC.
Image



Edit: https://github.com/dmabrothers/fblove

Take a look at this frame buffer implementation, it gives a good insight into the matter and how it could be done. My implementation is a little different, I use raw Byte Data and indexed images together with a palette.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 55 guests