Adding a texture to a mesh in dx9

hi there, im new to programing in c++ an directx9. i cant seem to figure out how to put a texture on to a mesh, i used blender3d to make the .x file, just a simple half sphere, and i got it loaded into my program, and i can import textures from files using D3DXCreateTextureFromFile, but when i SetTexture for the mesh it just has colour, never any texture. i hope i explained that right, as i said, totaly new to all this, excuse the spelling.

let me know if anyone knows somthing.
You might want to ask this on GameDev.net.
GameDev.net is probably the best bet to go.

It could be as simple as the .x export is missing texture coordinates (UV Unwrap) and so the texture is not being applied (as directx sees that the mesh lacks the required Texture coordinates). Or only the top left corner of the texture is being applied. If the top left is white, that white texture will be stretched and its colour multiplied with the base colour of the vertices or material of the mesh.
thanks guys, ill try going GameDev.

also didnt think of the texture coordinates, i will look into blender for that. thanks again!!
Topic archived. No new replies allowed.