Is it possible to tile an image in XNA so that it fills the entirety of a rectangle? I've tried Googling the subject, but I can't find anything that seems to work (I'm probably missing something obvious though). I found this MSDN page, but I can't seem to get it to work. Here's my code:
spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.LinearWrap, null, null);
But this just stretched the texture to fill the rectangle, not tile it. Any help is appreciated. Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…