dlang / project-ideas

Collection of impactful projects in the D ecosystem
36 stars 12 forks source link

Graphics library for resource constrained embedded systems #16

Open burner opened 5 years ago

burner commented 5 years ago

Create a 2D rasterizer, rich drawing primitives, and 2D graphics library suitable for resource constrained embedded systems (e.g. ARM Cortex-M) to be used in industrial controls, home appliances, medical devices, consumer electronics, and IoT just to name a few. The end goal would be something similar to Segger\'s emWin. The library would be used to drive LDCs similar to https://www.adafruit.com/product/3396 Requirements:

Related work:

Robert-M-Muench commented 5 years ago

Not sure if this makes sense to do in D (looking at the requirements). I think what is better is to use some existing lib and create a nice D binding. And use this as the "D standard graphics lib combo". D has good C interoperability, so why not use it.

JinShil commented 5 years ago

One reason to not use an existing C library is so users don't need to maintain a development environment with 2 toolchains. Another reason is because D offers many things that C does not, such as CTFE, templates, mixins, and memory safety, just to name a few. All of that could be utilized to create something superior to a C implementation in D. The compile-time and metaprogramming features could help quite a bit to tune a graphics library, at compile-time, to a specific hardware constraint (e.g. pixel format) that is known statically.

JinShil commented 5 years ago

More related work:

zelyony commented 5 years ago

probably the library will be written from scratch so Pixman can help http://www.pixman.org/ Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. Important users of pixman are the cairo graphics library and the X server. Its optimized for ARM/MIPS/PPC/SSE as u can see in sources.

Middle graphics libs are Cairo and Skia (just google names ~ " engine OR graphics"). Some GUI systems based on it.

rikkimax commented 3 years ago

probably the library will be written from scratch so Pixman can help http://www.pixman.org/

Be careful if you are looking at Pixman. It does not state what color spaces it uses. Which means its header might be a good place to get ideas, but everything else you'll need to read the papers on.

p0nce commented 3 years ago

Note that https://github.com/cerjones/dg2d exist, it uses intel-intrinsics and as such some of it is already optimized for arm32/arm64. What it doesn't do is being no dependency or -betterC.