Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 4232 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!