I'm now writing a game on WP7 using XNA Framework 4.0.
There are some pictures that needs to be tiled.
So I set the SamplerState[0]
to LinearWrap
before rendering these pictures and I switch it back to LinearClamp
once done.
However, the game still throws exceptions when it has finished all the tiled pictures and is about to create a VertexBuffer
for the first non-tiled (i.e. not wrapped) picture.
I've added a breakpoint at that line and has confirmed that GraphicsDevice's Samplerstates[0]
is LinearClamp
. All other 15 SamplerStates are LinearWrap
but I'm not using any multi-texture features so I don't think it's the reason. (frankly, I don't even know how to use multi-texture in XNA, maybe DualTextureEffect
?)
BTW, I've desperately set all 16 samplers to LinearClamp
, but the problem still occurs.
Anyone has encountered similar problems or has any solution?