I was going over one of the tutorials at ultimagegameprogramming.com about display lists. Apparently they can be used to increase the performance of opengl for frequently used commands. Here is description from the tutorial.
Does Bmax utilize these? would it help the performance if it did?
/* Display List Demo. Created by the Programming Ace. www.UltimateGameProgramming.com The purpose of this demo is to create an display list and use that to render a textured square to the screen. A display list is a way to precompile a bunch of OpenGL commands into a single list. When the list is called everything in it is executed. So if you stored a lot of glVertex3f calls in a list that is used to draw a box (lets say), all you have to do to draw that box after that is call one statement. This can be done as many times as you want to draw as many boxes as you want. Now list are not limited to drawing things but you get the picture. A display list requires an ID of data type integer just like a texture object ID (used when texture mapping). To create the display list you use a function called glGenList(GLsizei range). range is the amount of list to create. This is used if you wanted and array of list. The call would look like this... int SquareListID = glGenLists(1); Next you want to fill your list with commands that go together to perform a certain job. In this demo we want to keep everything needed to draw a square in a display list. To do this we first call glNewList() and end with glEndList(). Everything between those two calls will be stored in the display list. That would look like this... glNewList(SquareListID, GL_COMPILE); // Everything needed to draw the square. glBegin(GL_QUADS); glColor3f(1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, -1.0f, 0.0f); glColor3f(1.0f, 0.0f, 1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); glColor3f(0.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); glColor3f(0.0f, 1.0f, 0.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f, 1.0f, 0.0f); glEnd(); glEndList(); Now we just created the display list and stored all the OpenGL commands we care about in it. What about using the display list to draw that square? Simple enough to execute the display list you call glCallList(GLuint listName). That would look like this in the render function... glCallList(SquareListID); And thats it. You can call glCallList() as many times as you want to draw the square many times. This is good if you have more than one square in your scene and they are all the same. Using display lists can speed up your frame rate so I suggest you take advantage of them every chance you get. One last thing though we must delete the display list. This is done like so... glDeleteLists(SquareListID, 1); And there you have it. */
Does Bmax utilize these? would it help the performance if it did?