100.000 polys once again...

Started by
16 comments, last by matches81 18 years, 9 months ago
In mesh view editor my 100.000 plygons model goes with 30fps but when I run it in my engine it goes only with 5fps. Why? I used standard methods of loading and rendering .x file as in tutorial. Please help.
Advertisement
100,000 polys is way too much. I think most models are between 2000-7000 polys. What is the model of?
Its a man model but it does'n metter. I know it can be done. In Mesh Viewer it runs just fine.
Try

pMesh->OptimizeInplace(D3DXMESHOPT_ATTRSORT, ... )

right after D3DXLoadMesh...

Hope this will help
Would you be so kind and write full parameters list?
// this buffer holds adjacency information, as DXSDK says:
// "The adjacency data contains an array of three DWORDs per face that specify
// the three neighbors for each face in the mesh. For more information about
// accessing the buffer, see ID3DXBuffer"
LPD3DXBUFFER pAdjBuffer;

// this one for materials
LPD3DXBUFFER pMaterials;

// number of materials in buffer
DWORD dwNumMaterials;

//load our mesh
D3DXLoadMeshFromX("mesh.x", D3DXMESH_MANAGED, pDevice, &pAdjBuffer, &pMaterials, NULL, &dwNumMaterials, &pMesh);


//we have to specify adjacency when doing ATTRSORT
pMesh->OptimizeInplace(D3DXMESHOPT_ATTRSORT, NULL, &pAdjBuffer, NULL, NULL, NULL);

pAdjBuffer->Release();

You can also try D3DXMESHOPT_COMPACT and D3DXMESHOPT_VERTEXCACHE OR'ed with D3DXMESHOPT_ATTRSORT
shit, im having an error that
&g_pMesh->OptimizeInplace(D3DXMESHOPT_ATTRSORT, NULL, &pAdjBuffer, NULL, NULL, NULL);
can hold only 4 parameters and:
'ID3DXMesh::OptimizeInplace' : cannot convert parameter 2 from 'LPD3DXBUFFER *__w64 ' to 'const DWORD *'
Take out that second parameter so that it's:
&g_pMesh->OptimizeInplace(D3DXMESHOPT_ATTRSORT, &pAdjBuffer, NULL, NULL, NULL);
Ok I tried all aptions with NULL parameters and none of them seams to improve fps rate:(
With code:

&g_pMesh->OptimizeInplace(D3DXMESHOPT_ATTRSORT, &pAdjBuffer, NULL, NULL, NULL);

I'm having this error :

'ID3DXMesh::OptimizeInplace' : cannot convert parameter 2 from 'LPD3DXBUFFER *__w64 ' to 'const DWORD *'


Why? Are u shure it should be like that?

This topic is closed to new replies.

Advertisement