Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framebuffer support? #15

Open
bluecamel opened this issue Feb 20, 2014 · 7 comments
Open

Framebuffer support? #15

bluecamel opened this issue Feb 20, 2014 · 7 comments

Comments

@bluecamel
Copy link

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:

Loading typeface file: /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
Press return to exit.

But nothing is displayed on the screen. Any advice for getting that to work?

Thanks!

@eendeego
Copy link
Owner

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 ?

@bluecamel
Copy link
Author

I'd love to help, but unfortunately, that's quite beyond my knowledge :/

@piranna
Copy link

piranna commented Feb 7, 2015

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.

@itzaks
Copy link

itzaks commented Jul 23, 2015

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?

@itzaks
Copy link

itzaks commented Jul 23, 2015

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

@piranna
Copy link

piranna commented Jul 23, 2015

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.

@eendeego
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants