I get his error
"XNA Framework Reach profile requires TextureAddressMode to be Clamp when using texture sizes that are not powers of two"
for line
GraphicsDevice.DrawUserPrimitives<VertexPositionTexture>
(PrimitiveType.TriangleStrip, verts, 0, 2);
What should I do ?
Thanks,
When using a reach profile, use power of two sized textures or set the TextureAddressingMode to Clamp.
The TextureAddressingMode is part of the GraphicsDevice SamplerState. You need to set this state before your draw call. The following code shows how to set the first texture sampler to one of the built in sampler states.
GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;
GraphicsDevice.DrawUserPrimitives<VertexPositionTexture>
(PrimitiveType.TriangleStrip, verts, 0, 2);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With