Board index FlightGear Development Canvas

Sanity checks via getPixel() (white/invalid canvases) ?

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Sanity checks via getPixel() (white/invalid canvases) ?

Postby Hooray » Mon Nov 10, 2014 8:43 pm

Subject: Live WXRadar MapStructure Layer Development
Hooray wrote:Unlike HTML5 Canvas, there's no such a thing as getPixel() etc available in FG's Canvas AFAIK for pixel manipulation in a setPixel/getImageData fashion(?)
Probably, this is something that we don't want to do in Nasal space - it would be more efficient to really use either shaders or at least OpenCL bindings to accomplish the same in a more generic fashion.


Some kind of simple "querying" mechanism could actually be useful at some point - even if just for regression testing purposes, i.e. we could fill a canvas with a color and then check if getPixel() returns the correct color - it seems there are still people on old hardware who cannot use FG currently:

Subject: 737-300 Classic - New and Improved
Hooray wrote:
RAM25 wrote in Mon Nov 10, 2014 7:22 am:Thank you for working on this Boeing 737, does anybody know how the canvas EHSI can be changed into a normal non canvas EHSI, this is because the EHSI canvas is white/blank on the aircraft for me due to having an older computer.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11437
Joined: Tue Mar 25, 2008 8:40 am

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest