I'm looking for help fixing a small problem that I have with my XNA game project.
I currently have:
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend,
null, null, null, null, camera.ViewMatrix);
spriteBatch.Draw(Stone, TestPosition, Color.White);
spriteBatch.Draw(Person, playerPosition, Color.White);
spriteBatch.End();
and
spriteBatch.Begin(SpriteSortMode.Deferred,
null, SamplerState.LinearWrap, null, null);
spriteBatch.Draw(Grass, grassPosition,
new Rectangle(0, 0, Grass.Width * 60, Grass.Height * 1),
Color.White);
spriteBatch.Draw(Stone, StonePosition,
new Rectangle(0, 0, Stone.Width * 60, Stone.Height * 10),
Color.White);
spriteBatch.End();
I am looking to combine these two spriteBatch so that the stone and grass in the second spriteBatch will be affected by the viewmatrix.
I have tried:
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend,
SamplerState.LinearWrap, null, null, null, camera.ViewMatrix);
spriteBatch.Draw(Grass, grassPosition,
new Rectangle(0, 0, Grass.Width * 60, Grass.Height * 1),
Color.White);
spriteBatch.Draw(Stone, StonePosition,
new Rectangle(0, 0, Stone.Width * 60, Stone.Height * 10),
Color.White);
spriteBatch.Draw(Stone, TestPosition, Color.White);
spriteBatch.Draw(Person, playerPosition, Color.White);
spriteBatch.End();
However when I go to run the code, I get the following error:
XNA Framework Reach profile requires TextureAddressMode to be Clamp when using texture sizes that are not powers of two.
I hope that someone can help me achieve this, Thank You.