VBGamer |
|||||||||||||||||||||||||||
Putting textures on meshes Laurens Leemans (1 reply, 0 views) (2001-May-7) I'm working on a 3D engine and i'm using the helper mods and classes (D3D_INIT, D3D_UTIL, D3D_SHADERS, CD3D...)
I'm loading normal .X files like this:
Set D3D_Frame(0) = D3DUtil_LoadFromFile(App.path + "\data\Meshes\boxc.x", Nothing, Nothing)
Set D3D_Mesh(0, 0) = D3D_Frame(0).GetChildMesh(0)
Call D3D_Mesh(0, 0).Optimize
Call D3D_Mesh(0, 0).SetFVF(g_dev, VertexFVF)
then i'm using this to load the textures:
Set D3D_MeshTexture(0) = D3DUtil_CreateTexture(g_dev, App.path + "\data\Graphics\ground1.bmp", D3DFMT_UNKNOWN)
D3D_Mesh(0, 0).SetMaterialTexture 0, D3D_MeshTexture(0)
but it doesn't show any textures on the x mesh!
do i need to set renderstates or something like that? HELP!
|