Results 1 to 2 of 2

Thread: Texture Vertex Coordinate Order

  1. #1
    Guest

    Texture Vertex Coordinate Order

    Hi,


    I was just having some problems with texturing. When setting the texture coordinates before the vertex coordinates were set everything worked fine. Now my question: is the order important?

    Jurgen

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Fort Collins, Colorado
    Posts
    446

    Re: Texture Vertex Coordinate Order

    OpenGL is a state machine, thus when you set a texture coordinate, it will apply to the subsequent vertices until you set another texture coordinate or disable texturing.

    In other words, when you call glVertex*, the vertex is drawn and all other properties you have set prior to the glVertex* call are assumed to apply.

    In a similar fashion, when you specify a normal with glNormal*, that normal will apply to all vertices until you specify a new normal.

    Hope that helps.

Similar Threads

  1. Vertex Shader/Texture Lookup: Order of Operations
    By Rennie Johnson in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-11-2011, 07:04 PM
  2. Polygon Coordinate Order
    By wingo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-13-2008, 10:06 AM
  3. Vertex Count after the Z Order
    By Agostino in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-18-2008, 05:43 AM
  4. how glDrawElements sort the order of vertex?
    By sprawd in forum OpenGL: General
    Replies: 1
    Last Post: 05-30-2008, 07:46 AM
  5. byte/short vertex/texture coordinate
    By murphychen in forum OpenGL ES
    Replies: 3
    Last Post: 02-16-2005, 05:38 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