Jump to content
  • Advertisement

Archived

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

monkey_face

"scrolling" sky?

This topic is 5975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

any idea on how to do this? i guess changing the texture coordinates would be the best, but i don''t know what functions to call to "update" them. any help? thanks!

Share this post


Link to post
Share on other sites
Advertisement
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
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
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!