Draping texture for geometry drawn using GL_TRIANGLE_STRIP

Hi Community,
I am drawing 4 sides of a building using GL_TRIANGLE_STRIP… I would like to know how to drape a same 2D Texture image on all 4 sides of the building…

Any help is appreciated …

If it’s a model from a modeling application such as blender or 3d studio max then loaded with a model library like ASSIMP then read or watch a tutorial about texture mapping.

If it’s a model you have programmed with code then simply use the same texture and texture coordinates for each side.

[QUOTE=vinothrajendran4;1286107]Hi Community,
I am drawing 4 sides of a building using GL_TRIANGLE_STRIP… I would like to know how to drape a same 2D Texture image on all 4 sides of the building…

Any help is appreciated …[/QUOTE]

Well, you have two options.

The first one (preferable one), get rid of triangle strips. And you’ll be able to use one texture per face, easily.

The second one, arrange all your image in a single one so that it will fit your triangle strip. This is more complicated, more annoying and cannot be reused, however.