I’ve been trying to create a drawing game in Monogame.Forms. The drawing system works by creating a texture2D of the screen, made of an array of pixels, and changing the colour of these pixels when the mouse goes over them. It was working fine in normal monogame, but it doesn’t work in .Forms because when I use Editor.graphics to retrieve the Graphics device, the Editor is null. I don’t know how to define the editor, as I’ve looked through the tests projects on the Monogame.forms GitHub, and can’t see the editor is defined anywhere.
This is the part of the code where the texture is defined:
(Ignore the commented code, they’re from when I was working in normal Monogame)
Any advice would be greatly appreciated