Forum Discussion
ametcalfe
13 years agoHonored Guest
C++ development, stretching textures to faces
Hi all, I am having a play with the tiny room demo and wondered if anybody knew how to specify that a texture should be stretched across the surface rather than be repeat tiled? I am just wantin...
jherico
13 years agoAdventurer
"ametcalfe" wrote:
I am having a play with the tiny room demo and wondered if anybody knew how to specify that a texture should be stretched across the surface rather than be repeat tiled?
In order to represent complex geometry, many triangles are used for a given objects.

Textures on the other hand will be typically be designed around the object as a whole.

Because of this, many models intended to be textured will include what are called UV coordinates. For each XYZ 3D vertex coordinate, there will be a 2D UV coordinate which specifies the point on the 2D texture that corresponds to that point on the object's surface. For a triangle, you end up with 3 2D points cutting a triangle out of the original texture image, which is then pasted onto the actual geometry triangle.
If you're struggling with this you may want to grab the OpenGL Programming Guide and go through the sections on textures.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 10 months ago
- 9 months ago
- 5 months ago
- 10 months ago