Results 1 to 2 of 2

Thread: texture mapping for polygon

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2001
    Posts
    6

    texture mapping for polygon

    Hi All,

    I have a qn on texture mapping. I drew my octagon using GL_POLYGON, how do i go abt mapping my bitmap on to the object?

    so i have altogether 8 vertices drawn between my glBegin and glEnd.

    so how do i do it?
    please help.
    Thanx alot!

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Re: texture mapping for polygon

    Well, firstly i would like to say that what you did was bad. You should have drawn it using triangles, so as not to cause some complications that can occur. To texture map what you have done isnt much different from texturing a quad, you sinply will have more hassle with glTexCoord that if you did a simple quad. Simply assing a texture coordinate to each vertex and apply the texture.
    :: Sleep is a poor substitute for caffeine ::

Similar Threads

  1. texture mapping for n-sided concave polygon
    By ammuselvi in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-03-2004, 12:36 PM
  2. texture mapping for n-sided polygon
    By ammuselvi in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-02-2004, 10:12 PM
  3. Texture mapping to two sides of a polygon
    By tgorochowski in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-30-2004, 12:07 PM
  4. texture mapping on tessellated polygon
    By vr in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-03-2001, 12:04 AM
  5. texture mapping on tessellated polygon
    By vr in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-02-2001, 04:47 PM

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