Results 1 to 3 of 3

Thread: Vertex array with differ-normals of one vertex

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2009
    Posts
    2

    Vertex array with differ-normals of one vertex

    Vertex array is useful for different faces with duplicated vertices. But what shall I do if the vertex has different normal(texture) data for different faces? Make it duplicated vertices in array with different normal(texture) information? Or is there any better solution?

  2. #2
    Senior Member Frequent Contributor scratt's Avatar
    Join Date
    May 2008
    Location
    Thailand
    Posts
    555

    Re: Vertex array with differ-normals of one vertex

    It sounds like you are referring to element arrays, which reference into batches of vertex arrays.

    Unfortunately the way element arrays work means that each array of textcoords, colour data and so on run parallel to each other in any draw call, so AFAIK (when using the standard pipeline) elements with identical vertices but differing normals, colours and so on have to be duplicated in their entirety.

    If you are worried about the amount of data you are shuffling around you could look at more efficient formats for vertex data which will reduce transfer bandwidth. Say, using bytes for colour data and so on.

    Depending on the complexity of your vertex data you could perhaps have lots of small sets of vertex arrays which you pair up with different texture and normal data arrays.. But the function call overhead and complexity is probably not worth it.

    Another option is to use geometry shaders to procedurally construct certain aspects of your vertex data that change by using an attribute in yet another side array paired with your vertex data...

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2009
    Posts
    2

    Re: Vertex array with differ-normals of one vertex

    Thank you very much.

Similar Threads

  1. Replies: 6
    Last Post: 01-18-2015, 06:46 PM
  2. using dynamic index with static vertex-array with VBO// Normals
    By mcbastian in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-19-2004, 04:26 PM
  3. Replies: 6
    Last Post: 04-14-2004, 10:07 PM
  4. how to use vertex arrays with multiple normals per vertex ?
    By speedy gonzalez in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 11-18-2003, 10:09 AM
  5. Mixing Vertex Array Range & 'normal' vertex arrays
    By MarcusL in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 04-23-2001, 09:00 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