Jump to content
  • Advertisement
Sign in to follow this  

Problem with welding the vertices of a mesh

This topic is 4449 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

Hi i created a mesh which contains duplicated vertices. so i welded the vertex data using the D3DXWeldVertices() function. in the runtime i'm getting an Debug Error: Damage after normal block (#895) at a memory location. using the debug mode i found that the weldfunction causes the problem the code
        LPD3DXMESH pTempMesh;

	// Weld the vertices to remove the duplicated vertex
	// Set the epsilons to 0.001

	float *pFloats = (float*) &WeldEpsilons;

	// Initialise all the members of the D3DXWELDEPSILONS to have a     
        //tolerance value of 0.001
	for (i=0; i<sizeof (D3DXWELDEPSILONS) / sizeof (float); i++)
		*pFloats++ = 1e-3f;

	// Weld the vertex data
	if (FAILED (D3DXWeldVertices(pTempMesh,
                                     D3DXWELDEPSILONS_WELDPARTIALMATCHES |	    
		pTempMesh -> Release ();
		return false;

Please help me

Share this post

Link to post
Share on other sites
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!