"You may not call SetData on a resource while it is actively set on the GraphicsDevice. Unset it from the device before calling SetData."

Sep 28, 2012 at 10:56 AM

Hello All,

I'm using Silveright 5 RC and I'm trying to get this toolkit up and running for a project I'm working on. 

I get the fllowing error when attempting to run the Babylon.Toolkit.sample project.

"You may not call SetData on a resource while it is actively set on the GraphicsDevice. Unset it from the device before calling SetData."

I get this error in Babylon.Particles.ParticleSystem.AddParticlesInRange.  Has anyone else experienced this/managed to fix it or put in place a workaround?

Many Thanks in advance,

Mike

Jan 21, 2013 at 3:34 AM
MichaelHayball wrote:

Hello All,

I'm using Silveright 5 RC and I'm trying to get this toolkit up and running for a project I'm working on. 

I get the fllowing error when attempting to run the Babylon.Toolkit.sample project.

"You may not call SetData on a resource while it is actively set on the GraphicsDevice. Unset it from the device before calling SetData."

I get this error in Babylon.Particles.ParticleSystem.AddParticlesInRange.  Has anyone else experienced this/managed to fix it or put in place a workaround?

Many Thanks in advance,

Mike

before the "_vb.SetData(...)"

 add the code: _vb = new DynamicVertexBuffer(Device, ParticleVertex.VertexDeclaration, _vertices.Length, BufferUsage.WriteOnly);