Draw graphics on screen?

Just received my new CM-3 panel and am looking forward to using info-beamer hosted. I have experience in both Lua and Python so this platform looks like a great fit. My question is - what is the best way to draw graphics on the screen? As an example, I want to develop data displays with bar charts, line graphs, etc. Just looking into GLSL shaders now.


OK. I read through the docs again and have a better understanding of the lua api. We can create fragment shaders, but is it possible to develop a more complete opengl graphics pipeline in info-beamer?

Yeah. Might be worth investigating again. There is in fact an already existing but undocumented method of drawing some shapes on screen:

-- Once at start
local primitives = sys.get_ext "primitives"

-- later
local p = primitives.create_primitives()

p:quad(10, 10, 400, 400, 1,1,1,1) -- top left, bottom right, rgba
p:triangle(30, 90, 100, 300, 300, 30, 1,0,0,1) -- vertex 1, 2, 3 and rgba
p:line(40, 40,  900, 900, 0,1,1,1)

-- draw once or multiple times

The reason this isn’t documented is that I don’t really like the API and the result isn’t very fast as it issues a bunch of immediate mode GL calls. Directly exposing GL within Lua is also not really an option as the API should always be safe to use, so you cannot accidentally mess up the GL state. I’m not sure how to best solve all this.

info-beamer - Digital Signage for the Raspberry Pi community forum - Imprint