Original Post
Hi Guys I am trying to scale my texture so that it repeats it self accross the given surface. I know the easy way todo this and that is to multiply my texture coords by my scaling factor and this works perfect. The problem is i don't want to do this because that means i have to have 2 set's of texture coords(i only need 1 set) and also that means i have to compute the texture coords again everytime i want to change the scaling factor. So i thought i would play with D3DXMatrixScaling and do it that way. here is what i got but it doesn't work as you can see i am trying to have my texture repeat 10 times, i obviouslly stuffed something up. if this helps here is how i do it in opengl (i am actually porting some of my GL code to D3D9)
d3D9dev->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_ADDSIGNED );
d3D9dev->SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
d3D9dev->SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_CURRENT );
D3DXMatrixIdentity(&TMatrix);
D3DXMatrixScaling(&TMatrix,10.0f,10.0f,1.0f);
d3D9dev->SetTransform(D3DTS_TEXTURE1,&TMatrix);
d3D9dev->SetTextureStageState( 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2 );
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(10.0f, 10.0f,1.0f);
glMatrixMode(GL_MODELVIEW);