Exception in reach profile (samplerstate?)

Apr 19, 2012 at 8:35 PM

I am currently running krypton in reach profile. Whenever I drag my game window around I will get the following exception at KryptonRenderHelper.cs:

"XNA Framework Reach profile requires TextureAddressMode to be Clamp when using textures sizes that are not powers of two."

Screenshot at http://i43.tinypic.com/34yd8xk.jpg


I tried playing around with mGraphicsDevice samplerstates, but it didn't help. Any help would be greatly appreciated!


Best regards,


Apr 19, 2012 at 10:45 PM

This is probably due to the fact that the render target you are using is not a power of two.

Krypton may be responsible for this.

When Krypton generates the render target for the shadow generation, I believe it uses the current back buffer size, and simply copies that. Instead, you could calculate the next power-of-two size up from the backbuffer's size, and generate the backbuffer with that size instead. Although this may make more problems.

Unfortunately, I don't have the time right now to fix this issue. Is is possible to use the HD profile, at least temporarily? 

Apr 20, 2012 at 5:25 AM
Edited Apr 20, 2012 at 5:35 AM

I can keep working under Reach profile.

The error occurs only when the game screen is moved/dragged onto another monitor screen (I am using two monitors in extended mode).