Jump to content
  • Advertisement
Sign in to follow this  
Krisc

How to handle VertexBuffers on DeviceLost/Reset?

This topic is 4927 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!