日期:2014-05-20  浏览次数:21115 次

出错了!当使用大小不是 2 的幂的纹理时,XNA Framework Reach 配置文件要求 TextureAddressMode 为 Clamp
未处理 System.NotSupportedException
  Message=当使用大小不是 2 的幂的纹理时,XNA Framework Reach 配置文件要求 TextureAddressMode 为 Clamp。
  Source=Microsoft.Xna.Framework.Graphics
  StackTrace:
       在 Microsoft.Xna.Framework.Graphics.ProfileCapabilities.ThrowNotSupportedException(String message)
       在 Microsoft.Xna.Framework.Graphics.GraphicsDevice.VerifyCanDraw(Boolean bUserPrimitives, Boolean bIndexedPrimitives)
       在 Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 primitiveCount, VertexDeclaration vertexDeclaration)
       在 Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 primitiveCount)
       在 _3DMadness.Game1.Draw(GameTime gameTime) 位置 E:\测试区\CSharp\3DMadness\3DMadness\3DMadness\Game1.cs:行号 156
       在 Microsoft.Xna.Framework.Game.DrawFrame()
       在 Microsoft.Xna.Framework.Game.Tick()
       在 Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
       在 Microsoft.Xna.Framework.GameHost.OnIdle()
       在 Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
       在 Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
       在 System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
       在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 Microsoft.Xna.Framework.WindowsGameHost.Run()
       在 Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
       在 Microsoft.Xna.Framework.Game.Run()
       在 _3DMadness.Program.Main(String[] args) 位置 E:\测试区\CSharp\3DMadness\3DMadness\3DMadness\Program.cs:行号 15
  InnerException: 

------解决方案--------------------
GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;