Jump to content
  • Advertisement

Archived

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

Triangle with a Texture

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

If a triangle or pyrmaid, and I want to paste a texture. what is the value of the vector (tu, tv)? because it don''t have 4 points, therefore, it will not occur (0,0), (1.0), (0,1), (1,1).

Share this post


Link to post
Share on other sites
Advertisement
I think you are confused. Let me clear it up for you. You select a point, and then you set its Texture coordinates, or what part of the TEXTURE that will be put there, and then you do that for each point, and then set the Texture in the render function, and draw your objects... so, 0.0f, 0.0f would be upper left corner, 1.0f, 1.0f would be lower right, and 0.5f, 0.5f would be the center of the texture. Hope that helps

QRebound

Share this post


Link to post
Share on other sites
Stated another way, the texture is still square (well, rectangular anyway) so it has coordinates going from 0.0 to 1.0 in the 4 corners. You have to decide how that square texture will be mapped to a non-square surface.

Stay Casual,

Ken
Drunken Hyena

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!