Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

MD3D PatchMesh class...

Started by nlhowell May 5, 2004 at 3:21 PM 0 replies 250+ views
Original Post
nlhowell
nlhowell
I''m having trouble with the Managed D3D PatchMesh class; when I tell it to tessellate, it throws a null reference exception. Are there any tutorials where I can get an idea of how to properly use the PatchMesh class? Here''s my code:
				PatchMesh m = PatchMesh.CreateNPatchMesh(mBase);
				int faces = (int)(mBase.NumberFaces * Math.Pow(mDetail,1)),
					vertices = (int)(mBase.NumberVertices * Math.Pow(mDetail,1));
				mMesh = new Direct3D.Mesh(
					faces, vertices, 
					MeshFlags.Managed, 
					mBase.VertexFormat, mRenderer.Device);
			//	Direct3D.Mesh.TessellateNPatches(tmp, mAdj, 2, true);
				m.Tessellate(mDetail, (Mesh)mMesh);
				m.Dispose();
 

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.