Results 1 to 2 of 2

Thread: Applying a texture to a sphere created by hand

  1. #1
    Member Contributor
    Join Date
    Oct 2011
    Posts
    72

    Applying a texture to a sphere created by hand

    Hi there,

    I've created a sphere by hand (using VBOs and IBO) and now I wanna generate texture coordinates to apply to it a 2D texture.

    But I've a doubt: the vertices at the Greenwich meridian overlaps for the first and last triangle in each parallel. In the following link you can see a picture showing what I mean http://www.flickr.com/photos/59622706@N08/5448813110/. The yellow vertices and the green vertex are the vertices of the first triangle and the red vertices and the green vertex are the vertices of the last triangle at the same parallel. As you can see the green vertex is common for both triangles.

    The question is how can I specify that the green vertex has texture coordinate 1 for the last triangle if I said before that it has coordinate 0 for the first triangle?

    Thank you very much

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,674

    Re: Applying a texture to a sphere created by hand

    The question is how can I specify that the green vertex has texture coordinate 1 for the last triangle if I said before that it has coordinate 0 for the first triangle?
    You don't; you have to duplicate the positions. You have to have one vertex that uses the position coupled with texture coordinate 0, and another vertex that uses the same position, but with texture coordinate 1.

Similar Threads

  1. Making hour hand and minute hand rotate(Clock)
    By nadeera in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-16-2017, 01:30 AM
  2. Manipulate Hand Model created in Blender via input from Arduino
    By savvisingh in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-16-2017, 06:43 PM
  3. Creating a sphere by hand
    By exoide in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-03-2010, 06:10 PM
  4. Replies: 3
    Last Post: 03-26-2004, 05:20 AM
  5. Replies: 3
    Last Post: 09-16-2001, 09:59 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