I've just recently switched from XNA to MonoGame and now I've run into something that has never happened to me in XNA before.
I've created a 2x2 texture and filled it with a color by doing this:
//Generates a texture from the color.
Texture2D texture = new Texture2D(Constants.GAME.GraphicsDevice, 2, 2, false, SurfaceFormat.Color);
texture.SetData<Color>(new Color[] { alternateColor });
AlternateColor = texture;
What I use this texture for is for drawing rectangles of different sizes using the specified color. This has usually worked just fine for me in XNA but when I do this in MonoGame I get this:
The screen is suppose to be black here as I'm scaling that 2x2 texture up to fill the entire screen.
I've tried turning mipmaps off, I've tried turning multisampling off and I've tried setting my sample state [0] to use PointWrap but I just can't seem to get this to work.
Any suggestions would be much welcomed.
Thanks!
alternateColor
variable? Why aren't you callingSetData
with a 2x2 (or 4x1, whatever XNA wants) array of elements? \$\endgroup\$