Texture mapping an .X file

Started by
0 comments, last by Prairie 23 years, 9 months ago
I have created an object in a 3d modeler and converted it to an X file. But, when I load it into my program it is all white?? I''m confused because when I look at it in the X file viewer it is gray. I''m using the D3DFile.h utility for the loading. And I was also wondering how to wrap a texture around an x object. I''ve done it with shapes I coded in, but never something I''ve loaded. Thanks in advance for any advice Prairie
Advertisement
The white and gray issue is clear. The color of the shape depends on its material and the lights you set. The texture thing is different. It depends on the fact whether you store your texture coordinates in the .x file or not. When you store the texture coordinates in the .x file just call SetTexture for the shape and render it. If you don''t store the texture coordinates you have to compute them which is quite another story.

The last truth is that there is no magic(Feist)
The last truth is that there is no magic(Feist)

This topic is closed to new replies.

Advertisement