Sunday, 15 September 2013

c++ - D3DXTessellateNPatches - can't draw tessellated mesh -



c++ - D3DXTessellateNPatches - can't draw tessellated mesh -

i have code tessellate id3dxmesh through d3dxtessellatenpatches:

void tessellatemesh(lpd3dxmesh mesh, float numsegs){ lpdirect3ddevice9 ppdevice; d3dvertexelement9 meshvertdecl; mesh->getdevice(&ppdevice); mesh->getdeclaration(&meshvertdecl); id3dxmesh* ptemptessellationmesh; mesh->clonemesh( mesh->getoptions() & d3dxmesh_32bit, &meshvertdecl, ppdevice, &ptemptessellationmesh ); mesh->release(); mesh = ptemptessellationmesh; d3dxtessellatenpatches(mesh, null, numsegs, false, &ptemptessellationmesh, null); mesh->release(); mesh = ptemptessellationmesh; return; }

when pass mesh through - ok. when seek draw tessellated mesh, maintain receiving access violation messages. without tessellation fine too, maybe wrong function?

c++ directx mesh tessellation

No comments:

Post a Comment