Game Development Community

Terrain Clipmap fails on Xbox

by Russell Bishop · in Torque X 2D · 04/28/2008 (12:39 pm) · 1 replies

In ClipMap.cs, the UpdateAnimation method, around line 570. If the Recenter method is called on the Xbox it will eventually fail with the "cannot modify resource after it has been assigned to a device" message.

The actual exception is thrown on ClipMapBlenderImageCache.cs, the _UpdateRenderQuad method, line 325 when it tries to call _renderQuadVB.Instance.SetData.

#1
04/28/2008 (9:49 pm)
Well, if I add this line to the end of FinishRectUpdates it clears the error:
device.Vertices[0].SetSource(null, 0, 0);

but the terrain looks terrible on the Xbox.