Archived

This topic is now archived and is closed to further replies.

dustpuppy

Lights in DirectX

Recommended Posts

I have created a little graphics engine, that has a free roaming camera, frame, etc. When it comes to lights, I am getting a little stumped. The tiger.x and knot.x that come with the SDK in the media files refuse to light at all. I just get a black object on the screen. All the other .x files when loaded, light. I know that the tiger.x is a progressive mesh and I believe knot.x is as well. Does this have an impact on the lighting engine in DirectX?

Share this post


Link to post
Share on other sites
Apologies.

Didn''t bother testing whether D3DXComputeNormals actually succeeded. It didn''t.

Looking through the code for the progressive mesh example, it looks like the sample code plays around with FVF format when it clones a copy of the mesh.

Share this post


Link to post
Share on other sites
After cloning the object and playing around with its FVF. tiger.x and knot.x now light correctly.

No offense to the SDK team, but the documentation for D3D does seem a trifle lacking, compared to the MSDN stuff that MS produces.

Share this post


Link to post
Share on other sites