Triangle with a Texture

Started by
1 comment, last by gamedream 20 years, 3 months ago
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).
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
Quantumplation
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
Stay Casual,KenDrunken Hyena

This topic is closed to new replies.

Advertisement