Results 1 to 3 of 3

Thread: Draping texture for geometry drawn using GL_TRIANGLE_STRIP

  1. #1

    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 ....

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2017
    Posts
    107
    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.
    http://strong-grip.com Strong-Grip Future Technologies.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    459
    Quote Originally Posted by vinothrajendran4 View Post
    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 ....
    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.

Similar Threads

  1. How to scroll a drawn texture
    By RobSz123 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-19-2017, 09:48 PM
  2. Texture on an vertex array drawn shape
    By DirtyBlasion in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-15-2017, 06:48 AM
  3. Texture not being drawn, UV Coordinates not being passed into shader.
    By Dooskington in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 06-11-2013, 03:23 PM
  4. Use texture as geometry
    By Foxbat in forum OpenGL: Advanced Coding
    Replies: 11
    Last Post: 01-12-2007, 02:11 AM
  5. Replies: 3
    Last Post: 08-26-2003, 10:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean