@StainlessTobii wrote:
Hi guys,
I have moved development onto my gaming laptop so I can work on holiday. Yes I am a very sick puppy.
So my problem with Texture2D.FromStream came back.
The offending code is in
private unsafe static Texture2D PlatformFromStream(GraphicsDevice graphicsDevice, Stream stream)
// XNA blacks out any pixels with an alpha of zero. fixed (byte* b = &result.Data[0]) { for (var i = 0; i < result.Data.Length; i += 4) { if (b[i + 3] == 0) { b[i + 0] = 0; b[i + 1] = 0; b[i + 2] = 0; } } }
This is incorrect. I have checked as I still have a machine with XNA 4 on it and I don't have this problem with XNA.
This code ends up ruining the display
So I downloaded the latest source code and something has gone wrong. NuGet errors out immediately, so I cannot get the dependencies and hence cannot fix the issue myself.
Can we discuss why this code has been added? It's wrong.
Cheers
Posts: 5
Participants: 3