Setting TextureAddressMode for Clamp for XNA Reach

I get this exception:

An XNA Framework profile profile requires TextureAddressMode - a clip when using texture sizes that are not two powers.

when starting my game in the Reach settings.

I already installed everything to use SamplerState.LinearClamp, but an exception is still thrown everywhere!

eg.

        spriteBatch.Begin(0, BlendState.Opaque, SamplerState.LinearClamp, DepthStencilState.None,
        RasterizerState.CullCounterClockwise, effect);

        spriteBatch.Draw(texture, new Rectangle(0, 0, width, height), Color.White);
        spriteBatch.End();

Should this work correctly? BUT IT IS NOT!

Help!

+3
source share
1 answer

I may be a bit out of date with my XNA knowledge, but can you just change the state of the blend / rasterizer if SpriteBatch is set to SpriteSortMode.Immediate?

, , , , , ;)

0

Source: https://habr.com/ru/post/1784477/


All Articles