Impossible to use instancing with DirectX 9 when D3DCREATE_HARDWARE_VERTEXPROCESSING is enabled?

Started by
10 comments, last by unbird 10 years, 3 months ago

Currently I'm not using SetVertexShader() and SetPixelShader(). I'm not sure if you need those when you are using the effect interface. Aren't these two functions called somewhere implicitly?

Apparently, I don't need "pD3dDevice_->SetFVF(simpleKnobMesh_.Mesh->GetFVF());" but removing it didn't solve the problem either.

Can you elaborate a bit on the last part? I'm not sure I understood the part with the internal reference count. Isn't it sufficient to call release() once at the end on the mesh?

Advertisement
In the hope you get the same erroneous behaviour: Use PIX ! When the debug layer doesn't give useful clues (I don't think the leaks are the culprit here) it's time to get a closer look at what actually happens. Compare it with the running version and maybe use a very simple mesh (e.g. cube) and only a couple of instances for a start.

As an aside: Not sure, but since instancing needs SM 3, try actually using vs_3_0 and ps_3_0 in your shaders.

PS: And please use code tags when posting code.

This topic is closed to new replies.

Advertisement