• Advertisement
Sign in to follow this  

How to handle VertexBuffers on DeviceLost/Reset?

This topic is 4685 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My question is how am I supposed to handle VertexBuffers on a DeviceLost/Reset. Right now I have an event called OnBufferCreate that gets called when DeviceReset is fired however I get an error saying "Failed to create the Device". I am using C#, and the Framwork to create the device and window etc. Here is some of my code...
private void OnBufferCreate(object sender, EventArgs e)
	VertexBuffer vb = (VertexBuffer)sender;

	m_quad.AddVertsToVB(64, 64, ref vb, 0);
m_quad.AddVertsToVB() just adds its Vertices to the buffer correctly. I call this function on the device reset but doing so fails badly. the Quad class contains code for reinitializing its data and has been tested to work perfectly. Any suggestions? I can, of course, post more code if needed... Thanks!, John Sedlak

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement