Weird directx 9 error

Hi,

I’ve recently tested my game on windows and DirectX 9, but I’ve encountered this error:

:display:gsg:dxgsg9(error): CreateVertexDeclaration failed at (panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx:542), hr=E_FAIL: An undetermined error occurred

I get that more or less every frame. Other than that, my game works fine, except the water (which is rendered using a secondary camera).
Could anyone elaborate what it means?

E_FAIL is returned by DirectX9, not by Panda. It happened during CreateVertexDeclaration, which is when it is trying to upload the per-vertex data to the shader. Something in your graphics driver didn’t think too much of whatever Panda was doing there.

More than that, I don’t know.

David

Thanks. Any ideas where to start looking for the bug? In my offscreen buffers perhaps? Or my shaders?

I would look carefully at the per-vertex data associated with your geometry. Make sure it is sensible. Try turning it off for different parts of the scene to try to isolate which object is causing the problem. Then look closely at that object.

David