Advertisement Jump to content
Sign in to follow this  

NVMeshMender - problems with using

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

I'm trying to use mesh mender to generate tangent-basis and the application crashes when using Mend function (says that vector is out of range). My code is very simple (note that I dont use any index buffer so every successive three indices point to every successive three vertices):
		std::vector<unsigned int> indices;
		std::vector<unsigned int> remap;
		std::vector<MeshMender::Vertex> verts;

		for (int t = 0; t < 3*facesNum; ++t)
			indices.push_back(3*t + 0);
			indices.push_back(3*t + 1);
			indices.push_back(3*t + 2);

		MeshMender::Vertex inv;

		for (int t = 0; t < 3*facesNum; ++t)
			inv.pos = D3DXVECTOR3(vertices[t].position.x, vertices[t].position.y, vertices[t].position.z);
			inv.s = vertices[t].texCoord0.x;
			inv.t = vertices[t].texCoord0.y;
			verts.push_back( inv );

		const float minNormalCreaseCos = 0.2f;
		const float minTangentCreaseCos = 0.2f;
		const float minBinormalCreaseCos = 0.2f;
		const float weightNormalsByArea = 0.5f;

		MeshMender mender;


Share this post

Link to post
Share on other sites
Ok, never mind. I decided to use D3DXComputeTangentFrame, save data to my own file format and I can use it with both, D3D and OGL renderers :)

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!