CD3DFile problem

Started by
0 comments, last by Facehat 24 years, 4 months ago
I've been trying the CD3DFile object which comes with the DirectX7 SDK samples when I ran into a little problem with textures. I can load a model and display it just fine, but for some reason it doesn't show the texture. I have the texture in the same directory as the model, so I don't believe that is the problem. Has anyone encountered this? If so, do you know how to fix it?

BTW, yes, the object does support textures. I looked at the code for it and it loads in the textures and sets them up to display, so that isn't the problem either.

--TheGoop

Advertisement
I also had this problem the first time so i think this should help you out:

Use D3DTextr_RestoreAllTextures() after you load the x file and D3DTextr_InvalidateAllTextures() before your program quits. You find the function prototypes in the d3dtextr.h file and you have to link to d3dframe.lib. Hope this helps you out.

P.S.: It's possible that the function names i wrote are not correct because i don't know all of them by heart. D3DTextr_ResoreAllTextures() can also be D3DTextr_RestoreAllSurfaces(). But this is the way to go.

VirtualNext

This topic is closed to new replies.

Advertisement