Closed DMFirmy closed 5 years ago
After a month, I was hoping that someone might be able to provide me with a bit of help as to what the issue that is causing these rendering issues. Has anyone had an opportunity to look into this yet, or did I perhaps post this in the wrong place? Any insight would be very greatly appreciated.
@DMFirmy Really sorry about the late reply. I'm sure you've moved on.
@CartBlanche Thank you for a response, even if it is rather late in coming... I have attached a .zip file to this post that contains the solution I finally found for the white-texture issue. Honestly, you are correct that I have moved on from this project, so I don't exactly remember what method I finally wound up using to resolve the issue, but perhaps you can glean what is needed from the code samples contained in the attached .zip file.
I have been working on the revival of a Tile Map Editor that I had previously abandoned work on due to the death of the XNA Framework, and I have been using a modified version of the WPFInteropSample as my rendering control. Most of the modifications are simply the renaming of files and objects, or the addition of some new events that allow me to handle the rendering outside of the control itself. Also included in this modified version is a simple helper class that allows me to load a Texture2D object from a standard image file.
In my testing I have discovered that when trying to render an image that contains transparent pixels, the transparent pixels are rendered as pure white, covering any content that is beneath them. Similarly, using the rendering control pixels that are colored as Magenta are also rendered to the screen, where they are rendered as transparent within an actual MonoGame.
I have written a detailed blog post about the issues I am experiencing on my website, which includes screenshots as well as the complete sample application I created to demonstrate these issues. I am very hopeful that by posting an issue here some form of resolution to this issue can be discovered, as this rendering control is the only working example of rendering MonoGame content to a WPF Application that I have managed to have any success at all with. There is a high demand online for the ability to render MonoGame content into a WPF application, and if these issues can be resolved I believe that this sample may become the most popular and used resource available for this purpose.
Thank you all for your time, and I apologize to the developers in advance for any liberties I took in modifying the code from the samples. I did a bit of renaming and refactoring just to make it easier for myself to follow the logic, but functionally the control works exactly as the original sample.