Ahoj, pro zjednoduseni jsem si zkusil napsat priklad, kdy jsem chtel jen zkopirovat jednu Texturu2D do druhe. Viz. nasledujici kod: ball = Content.Load<Texture2D>("ball"); Color[] colors2D = new Color[80 * 80]; ball.GetData(colors2D); copyball = new Texture2D(GraphicsDevice, 80, 80); copyball.SetData<Color>(colors2D); Pri zpusteni program zahlasi na radku ball.GetData(colors2D); vyjimku: An InvalidOperationException exception is thrown when the failure to invoke a method is caused by a reason other than an invalid argument. This might be thrown by .NET Framework methods when the underlying Win32 method cannot be invoked. Muzes mi s tim pomoct?
|