Help making a game with transparency

Murilo murilomiranda92 at hotmail.com
Fri Sep 27 22:53:05 UTC 2019


On Friday, 27 September 2019 at 22:13:43 UTC, matheus wrote:
> On Friday, 27 September 2019 at 21:16:07 UTC, Murilo wrote:
>> ...
>> Here it is, how do I make the ship have a transparent 
>> background?
>
> First: Your PNG file has transparency data information right?
>
> Second: I was Looking into the drawImage function (Line 854):
>
> https://github.com/adamdruppe/arsd/blob/b0d21de148ef0b23ea845be322af5e6931ca4cb6/screen.d
>
> And I'd suggest you to try to add the glEnable(GL_ALPHA_TEST); 
> before glBegin(GL_QUADS);
>
> In fact you should do this only once, maybe inside the 
> constructor, but just try it there to see if it works.
>
> Matheus.

Thanks for trying to help me but unfortunately you are suggesting 
I use arsd.screen which is supposed to be obsolete, I am using 
arsd.simpledisplay instead and it is very different although many 
functions have the same name.


More information about the Digitalmars-d-learn mailing list