Open bluecamel opened 10 years ago
This module relies on the Raspberry Pi's OpenVG implementation, which, in turn only works with the native hardware accelerated frame buffer.
In order to get this library to work with that frame buffer, I think you need to render off screen (actually, you'll be rendering to the HDMI/composite screen) and then copy the rendered image bits to the other (software) framebuffer. You'll have to implement this in C to be fast enough.
I also have a screen similar to that one, and these were my actual plans to put it to work. Can you post some results (images) if you get that to work ?
I'd love to help, but unfortunately, that's quite beyond my knowledge :/
Could this work in a generic framebuffer device like VESA one? I'm thinking to use this for drawing on a Linux terminal on NodeOS.
This would be great, @luismreis if you could give me some more instructions on how to start working on this I might give it a shot. Or are there any further updates on this area?
Could this be used for this purpose? https://github.com/AndrewFromMelbourne/raspi2fb
EDIT: Found this library that solves it for me https://github.com/vesteraas/node-pitft
I've managed with others to make node-canvas to use FbDev, and although unacelerated it works. There are plans to add support for EGL, too.
I've implemented that with this project: https://github.com/luismreis/node-fbcp.
Basically, you extend node-openvg-canvas
'es swapBuffers to call copyBuffers
:
var Canvas = require('openvg-canvas');
var fbcp = require('fbcp');
//...
var originalSwapBuffers = Canvas.vgSwapBuffers;
Canvas.vgSwapBuffers = function fbcpSwapBuffers() {
originalSwapBuffers();
fbcp.copyBuffers();
};
It's super fast, transparent, and gets used by the supplied requestAnimationFrame
.
I'm trying to use this with a touch screen TFT (from Adafruit: https://www.adafruit.com/products/1601), which uses framebuffer.
I've got everything installed following the README, but running the examples does nothing. Well, it does print out:
But nothing is displayed on the screen. Any advice for getting that to work?
Thanks!