今天终于成功将广告平台加进了windows phone 7+silverlight+cocos2d-x xna项目。广告虽然成功载入,但发现点击广告跳转浏览器,然后再按返回键返回会造成程序崩溃。报:

XNA Framework Reach profile requires TextureAddressMode to be Clamp when using texture sizes that are not powers of two 错误。

这个是xna载入资源重复造成的。

解决办法:在Draw中加入SharedGraphicsDeviceManager.Current.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;