title: Clamping TextureAddressMode in XNA
body: <p>I've been working on implementing a 2D lighting system in XNA, and I've gotten the system to work--as long as my window's dimensions are powers of two.  Otherwise, the program will fail at this line:</p>
  
  <pre><code>GraphicsDevice.DrawUserPrimitives(PrimitiveType.TriangleStrip, Vertices, 0, 2);
  </code></pre>
  
  <p>The exception states that "XNA Framework Reach profile requires TextureAddressMode to be Clamp when using texture sizes that are not powers of two," and every attempt that I've made to slve this problem has failed--the most common solution I've found on the internet is to put the line <code>GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;</code> directly above the line above, but that hasn't solved my problem.</p>
  
  <p>I apologize if I've left out any information that could be necessary to solve this; I'll be more than happy to provide more as needed.</p>