Jump to content
  • Advertisement
Sign in to follow this  

Can't light a ID3DXMesh object created with CreateD3DXTextMesh()

This topic is 4146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I define some lights and set a material. Then I draw some simple objects using IDirect3DDevice9::DrawIndexedPrimitiveUP() as well as an extruded text mesh using ID3DXMesh::DrawSubset(). The simple objects are lit as one would expect, given the material and the lights. However, the ID3DXMesh object remains uniform grey. Using ID3DXMesh::GetDeclaration() returns the following results: Declaration Number: 0 Stream: 0 Offset: 0 Type: LFLOAT3 Method: DEFAULT Usage: POSITION UsageIndex: 0 Declaration Number: 1 Stream: 0 Offset: 12 Type: LFLOAT3 Method: DEFAULT Usage: NORMAL UsageIndex: 0 I've calculated normals using D3DXComputeNormals(). So... what is going on here?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!