theproadam / renderXF

High performance software rendering in c#
MIT License
11 stars 4 forks source link

feat: Optionally allow alpha to be specified when clearing #11

Closed kf6kjg closed 3 years ago

kf6kjg commented 3 years ago

Since only 32 bpp is currently allowed, leaving the alpha set to 0 makes the images fully transparent. This changes default behavior and sets the alpha channel to fully opaque by default, but the user can override with any value needed.

theproadam commented 3 years ago

Nice catch! Reading this I was a bit confused since I thought I had made the clear code have 255 as the alpha but it seems like that was just XFDraw which had that.

This also explains why my bitmap blitting demo had the black bar behind the text and I had to manually delete the transparency with GL.DeleteTransparency(bmp);