Archived

This topic is now archived and is closed to further replies.

monkey_face

"scrolling" sky?

Recommended Posts

amish1234    104
Just make a function that changes the texture coordinates. I would suggest you move the coordinates according to how much time has elapsed so that you get the same results on any machine. After the tex coordinates are changed, just call your render function and it should work fine.

Share this post


Link to post
Share on other sites
amish1234    104
Just make a function that changes the texture coordinates. I would suggest you move the coordinates according to how much time has elapsed so that you get the same results on any machine. After the tex coordinates are changed, just call your render function and it should work fine.

Share this post


Link to post
Share on other sites
nPawn    110
Don''t actually change texture coordinates, use a texture transform, here''s the code I use to move my sky:

m_pd3dDevice->SetTextureStageState(0, DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2);

m_matrixScrollTexture._31 += fTextureX;
m_matrixScrollTexture._32 -= fTextureY;
m_matrixScrollTexture._33 += fTextureZ;

m_pd3dDevice->SetTransform( D3DTS_TEXTURE0, &m_matrixScrollTexture);

Share this post


Link to post
Share on other sites
monkey_face    122
can anyone explain how i can use the above code in my program? i''ve never used SetTextureStageState, and the TextureX,Y,Z variables..no idea what they should be....


thanks

Share this post


Link to post
Share on other sites