Results 1 to 4 of 4

Thread: Fastest way to store objects

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    10

    Fastest way to store objects

    I'd like to have you opinions about the fastest way to store objects in memory. I currently use linked lists for primitives of equal type, eg quads using texture[0], what works acceptably fast even though I have to save a lot of information about every type. There is but a small possibility that I still didn't find the perfect way so do you have any suggestions?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    186

    Re: Fastest way to store objects

    I use arrays - less memory, and it's handy sometimes to know that it's contiguous - you can use pointer arithmetic to access it if you're going linearly.

    Chris

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jun 2000
    Location
    FRANCE
    Posts
    147

    Re: Fastest way to store objects

    You should use array for vertices, faces and texture coordinate, since it's faster than linked list and you'll be able to use Vertex Array (via glVertexPointer and so on) instead of glBegin, that will speed up the whole drawing function.

    Arath

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    10

    Re: Fastest way to store objects

    Well I do use arrays, but only partially. As I mentioned above I have a structure that stores the type of drawing to do, the texture to use and arrays for vertices and faces, and has a pointer to the next structure for primitives using different texture or shape. What I actually meant is, if there Is a better way to do that.

Similar Threads

  1. Best way to store and draw multiple objects
    By neon29 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-17-2015, 05:17 PM
  2. Replies: 0
    Last Post: 06-14-2011, 03:04 AM
  3. Fastest camera?
    By Vasko in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 07-10-2004, 08:10 AM
  4. Fastest way to billboard
    By SquidMan in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-09-2001, 06:25 AM
  5. Fastest/Best way of moving
    By Dies_Irae in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 12-05-2001, 04:53 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