Original Post
I am trying to create a mesh using the D3DXCreateMeshFVF however the function keeps returning a failure status of value D3DERR_INVALIDCALL. From what I have read in the documentation D3DERR_INVALIDCALL usually is returned as a result of one passing an invalid parameter to the function. This is basically the line of code I wrote for creating the mesh HRESULT hr = D3DXCreateMeshFVF (numTriangles,numVertices,D3DXMESH_MANAGED,CVFVF,Renderer::getDeviceHandle(),&mesh); where numTriangles is a DWORD that equals 130050, numVertices equals 65536, CVFVF is a #define constant equal to (D3DFVF_XYZ | D3DFVF_DIFFUSE), and Renderer::getDeviceHandle() is just a call to my Renderer wrapper class that just returns the device handle. now none of these parameters seem invalid to me unless there is some kind of rule where the numVertices has to be bigger than numTriangles. Would anyone have any idea as to why this would fail?