Thread: OpenGL Objects

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2013
    Location
    UK
    Posts
    19
    Thanks for the quick reply. I'm just looking for people's views on the subject.

    At the moment I'm using structures with multi-dimensional pointer arrays, mainly because I'm more comfortable with them. I was wondering if I should of been using linked list because I've mostly over looked them, and thought it might be wise to get a little insight into it before I start to create any larger projects.

  2. #2
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    Quote Originally Posted by 0x47617279 View Post
    Thanks for the quick reply. I'm just looking for people's views on the subject.

    At the moment I'm using structures with multi-dimensional pointer arrays, mainly because I'm more comfortable with them. I was wondering if I should of been using linked list because I've mostly over looked them, and thought it might be wise to get a little insight into it before I start to create any larger projects.
    What are you doing most with the data? Inserting, Removing, Accessing, traversing etc.. most often/importantly?

    As far as using a linked list (of any kind, except maybe a skip list) a good question to rule them out is "Do I need random access on this data?". Random access on an array is O(1) on a linked list it is worst case O(N) where N is the total number of items in the list.

    If random access is not needed, or if you need something like a Stack, queue, dequeue, FIFO, LIFO etc.. type structure then a linked list is the best thing because you can get O(1) insert/removal from the Head/tail of the list (tail only with a double linked list).

    I think you need to explain the use case of this "multi-dimensional pointer array" structure you keep mentioning more before we can make a real critique on what data structure would be better.
    Last edited by nonpuz; 01-06-2013 at 04:41 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 05-24-2011, 06:36 PM
  2. rotating composite objects with OpenGL
    By elad in forum Game Programming
    Replies: 11
    Last Post: 10-19-2008, 07:04 AM
  3. Assigning objects to objects
    By Swordsalot in forum C++ Programming
    Replies: 4
    Last Post: 07-26-2006, 03:47 AM
  4. Replies: 4
    Last Post: 10-16-2003, 11:26 AM
  5. 3D Objects In OpenGL
    By kas2002 in forum Game Programming
    Replies: 5
    Last Post: 08-06-2002, 12:15 PM