Sign in to follow this  
lordzero

D3DX API and textures

Recommended Posts

Hello I can load static x files with pure directx and set texture using the device see: var ... TextureName: IDirect3DTexture9; with the function D3DXLoadTextureFromFile I can load it, and using the device... Direct3DDevice.SetTexture(0, TextureName); and to set the texture in other static .x file I'm using here: Direct3DDevice.SetTexture(0, nil); and after I'm using the same process again: Direct3DDevice.SetTexture(0, OtherTextureName); What is the best way to apply texture? Greets

Share this post


Link to post
Share on other sites
Provide texture info in your vertex :

struct Vertex
{
D3DXVECTOR3 Position; //x,y,z coords
float tu,tv; //Texture Coords for mapping
};

For a better idea, try
http://www.chadvernon.com/blog/tutorials/directx9/texture-mapping/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this