On Friday, 27 September 2019 at 17:53:33 UTC, matheus wrote:
On Friday, 27 September 2019 at 16:36:14 UTC, Murilo wrote:
...Do you know the arsd library?
Yes but I use mostly terminal.d and others.
On the other hand I use to code games too using SDL and OpenGL.
I know for example in OpenGL you can do:
glEnable(GL_ALPHA_TEST); to enable alpha channel and set
Thanks, but I don't know how that will fit in my code. I will
show up a code snippet and you tell me how I can use your idea in
import arsd.image, arsd.simpledisplay;
auto memImgShip = loadImageFromFile("ship.png"),
memImgBackground = loadImageFromFile("background.png");
auto imgShip = Image.fromMemoryImage(memImgShip),
imgBackground = Image.fromMemoryImage(memImgBackground);
auto window = new SimpleWindow;
auto painter = window.draw;
painter.drawImage(Point(0, 0), imgBackground);
painter.drawImage(Point(100, 100), imgShip);
Here it is, how do I make the ship have a transparent background?