Results 1 to 4 of 4

Thread: Quickie: Where best to store indices?

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    19

    Quickie: Where best to store indices?

    When drawing primitives with glDrawElements, and passing it an array of indices, should the index array be stored in video/AGP memory, along with the vertex positions, normals, UVs, and colours, or should it be stored in system meory? In other words, is it the CPU or the GPU that need fast access to the indices?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2002
    Posts
    201

    Re: Quickie: Where best to store indices?

    store it in video memory and then tell me how you did it

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Nov 2002
    Location
    Latvia
    Posts
    626

    Re: Quickie: Where best to store indices?

    In vbo you can create element_array, and driver finds the best place to store your array of indices, not necesarily in the same place as v/n/uv's

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    19

    Re: Quickie: Where best to store indices?

    Originally posted by mdog1234:
    store it in video memory and then tell me how you did it
    I'd have done it the same way I store my vertex data: wglAllocateMemoryNV(...video/AGP memory, please...), then set my indices pointer to point to a part of the allocated memory, write my indices there, then use that pointer when calling glDrawElements.

Similar Threads

  1. VBO without indices?
    By exoide in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-25-2010, 11:48 AM
  2. store a lot of textures for later use
    By LR123 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-13-2009, 11:29 AM
  3. store indices data in VBO
    By pango in forum OpenGL: Advanced Coding
    Replies: 24
    Last Post: 02-20-2008, 01:05 PM
  4. opengl 1.5, just a quickie
    By cutting_crew in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 12-09-2003, 03:06 PM
  5. What about the free store? :)
    By BlueJ in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 05-08-2001, 07:42 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