   Texture problem from .X file
  Well, I''m very new in DirectX. I''m using Directx9 SDK and its samples for the beginnig. I''m using the helper include files that with the SDK. I have .X file named tiger.x (the .x file for the Tutorial No.6 for using Mesh). Now I go to sample ClipMirror,and it use the Teapot.X file. In that sample I change the source code to use Tiger.X instead of Teapot.X .When the application run it create the Tiger correctly but without any texture(actually the texture is black),and do not use the texture file with tiger.x file. In the debugger I can see that it gets the file name of texture  but it sraw it in black. I think there is a property that I should change but I don''t know what is that. Any help is appreciated.Thanks   Mazy 
  welcome to the wonderful world of not very well coded DX samples. you''ll find a lot of the samples are coded for one specific case and frequently fall apart when you try and expand them to something more flexible. but that''s just part of the learning process, eh?for a "quick fix" for this particular sample, do two things:find the line that has D3DRS_AMBIENT in it and change the 0xff555555 value to 0xffffffff. this will brighten up things a bit, although not very realistically. ideally you will probably want to mess with the light parms if the scene is too dark for you.find CMyD3DApplication::RenderMirror() and somewhere in there place a m_pd3dDevice->SetTexture ( 0, NULL ) ; statement. this will prevent the tiger''s texture from being applied to the mirror''s quad, which is what causes the mirror to show up as brown. technically i believe you are supposed to disable the 0 texture stage state before rendering the mirror, but that would mean you would have to reset it to MODULATE once the mirror quad is drawn, and i''m lazy. ;quote:Original post by Anonymous Poster  find the line that has D3DRS_AMBIENT in it and change the 0xff555555 value to 0xffffffff. this will brighten up things a bit, although not very realistically. ideally you will probably want to mess with the light parms if the scene is too dark for you.find CMyD3DApplication::RenderMirror() and somewhere in there place a m_pd3dDevice->SetTexture ( 0, NULL ) ; statement. this will prevent the tiger''s texture from being applied to the mirror''s quad, which is what causes the mirror to show up as brown. technically i believe you are supposed to disable the 0 texture stage state before rendering the mirror, but that would mean you would have to reset it to MODULATE once the mirror quad is drawn, and i''m lazy.  Dear Freind:Many thanks for your rely. I was not at home yesterday night to reply you. Today is my second day of DirectX, and its really hard to understand,but I have little progress.The thing you said about Mirror was work properly and its now really work as a Mirror,But the tiger does not change , its still black and the texture file does not reflect. And also light still do not appear. Is that something related to tiger.x file or something in codes?Thanks Mazy 