Open nordlow opened 3 years ago
What would be better:
Tbh I've never used linux so wouldn't know where to start. The only platform specific stuff is the main even loop and the Window class and a few bits that support that. I think I kept all the platform specific stuff in window.d, but there is some stuff that could be moved out into a separate module to make window.d even smaller, then I guess it's just making a linux version of that module. Assuming linux apps work similar to windows. So i have no problem with adding it if someone wants to do it, but I dont think i have the time to do it myself.
Honestly sounds more debt than it is worth. Examples need to be maintained, and in this case:
arsd:simpledisplay
could be an option too; possibly the simplest however configurations are used for platforms... which is an incorrect way to use dub https://github.com/adamdruppe/arsd/blob/master/dub.json#L53I'll need linux support when I come to test it on Arm i think, so if nobody has done it by then I'll look into it. Tbh all it needs is a window on screen, paint events, mouse clicks, and a message loop, just the bare bones.
Just in case. This is a small app that displays to SDL2 using dplug:canvas
(a dg2d fork). It could be useful to copy code from in case you need a SDL-based example in dg2d
.
Thanks, will have a look through it now.
I had tried building an example with SDL, but there is a fundamental difference: you'd have to forego local screen update (Invalidate and WM_PAINT) to perform a full screen update at all times. So it's also about what do you want @cerjones from the example.
The demo its just a demo, it's not intended as actual code anyone might use in production so it doesn't really matter i think. Ill probably get around to making a linux window at some point, but to be honest haven't had much time to do anything lately.
What about making the rendering API of dg2d operate on a pixel buffer (perhaps with different format and orderings but defaulted to RGBA32) that can be queried from the window API such as SDL or Wayland [1]?
The rasterizer takes a externally supplied pixel buffer, the Canvas can be made to do so too no problem. There are a couple of requirements though... 32 bit ARGB, alpha in high 8 bits 16 byte alignment for the start of each scanline
The order of RGB could be different, but to have the alpha in say the low 8 bits would mean a fair bit of work.
made a quick and dirty x11 version in #9 to try out, but I think the demo should rather focus on rendering than on windowing backends
Awesome thanks, tbh I haven't had time to look at it yet but hopefully tonight / tomorrow maybe, just want to check it out on my system before I merge it. Yeah the demo stuff is really just for development / testing purposes, I have no intention of windowing being part of the main lib. Thanks again :+1:
dun run
underdemo
fails asAre there any plans for Linux support?
I'm sitting on Ubuntu 20.04.