Results 1 to 3 of 3

Thread: Display List Versus Array

  1. #1
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Display List Versus Array

    I'm working on a tile based side scroller game using OpenGL for the graphics. I like OpenGL alot more than any of the Microsoft-based graphic APIs, so please hold the complaints.

    Anyway, here's my question. Right now the way I'm drawing the tiles involves arrays of floats. The game engine supports "solid" square tiles as well as inclined tiles and stair-shaped tiles for variety. During the rendering phase, each tile's shape is checked, and depending on what shape it has, one of the different arrays is drawn.

    I thought I could optimize this a bit by turning each array into a display list, so the rendering function would be able to just call one list per tile.

    I keep the arrays in global variables so that they don't have to be initialized for every frame that renders, and converting the tiles to display lists would give me a little more elbow room if I got rid of those monsters.

    Oh yeah, I don't mean a "true" vertex array in the OpenGL sense, I just have an array of eight floats that define the vertices of the tile, then I call glVertex2fv() four times with an incrementing address.

    So, would the extra effort of rewriting the rendering function and creating display lists really be worth it?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: Display List Versus Array

    Will your vertex array grow in size? Do you draw this shape many times?

    gav

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    Re: Display List Versus Array

    Will your vertex array grow in size? Do you draw this shape many times?

    gav

Similar Threads

  1. Single mesh versus array of mesh
    By DannySaucen in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-06-2012, 08:44 AM
  2. Performance-vertex array vs. display list
    By kobebryant in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-12-2006, 04:19 AM
  3. Display list corruption when list created in shared library
    By Michael Wouters in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 09-16-2005, 10:55 PM
  4. vertex array vs display list
    By HamsterofDeath in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 01-21-2003, 01:54 AM
  5. Display List with Vertex Array
    By Omaha in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-13-2002, 01:53 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