Jump to content
  • Advertisement

Archived

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

Revil

Texture Coordinates?

This topic is 5647 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

Hi, please, does anybody know, how to map textures (in DX8) using ''real'' image coordinates, instead of 0.0 - 1.0? I mean I would like to assign my vertices'' tu/tv coordinates like tv = 140; instead of tv = 1.0; I know it would be possible to calculate manually, but I am sure, there is another way... I''ve heard something about texture transformations/??, but I am just a begginner and don''t quite understand Thanks for reply...

Share this post


Link to post
Share on other sites
Advertisement
0 is 0.0 (min x) and 140 is 1.0 (max x) right?

so let''s say you want to enter the x coord 100 that would be 100/140.0f = 0.71 (don''t forget to typecast to float or you''ll get zero every time)

.Pangis

Share this post


Link to post
Share on other sites
0 is 0.0 (min x) and 140 is 1.0 (max x) right?

so let''s say you want to enter the x coord 100 that would be 100/140.0f = 0.71 (don''t forget to typecast to float or you''ll get zero every time)

.Pangis

Share this post


Link to post
Share on other sites
Yes, thanks for reply, but I know this is possible, as a matter of fact, I am using it now, but I think there is some way to set the type of adressing mode (or how is it called) once at initialization and don''t care later (calculating ''manually''). But thanks anyway...

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!