vertex buffer object and Display list

Hi all,

I use Display list in my first project and I use vertex buffer object in my second project. DL shows better FPS than VBO, why? And second question, is GeForce 8XXX generates indexex for for repeating points in VBO geometry?

P.S. Sorry if my problem has been discussed, I bad speak english.

  1. Well, if you don’t draw much data, but rather frequently change OpenGL state, then DL might be faster.
    Anyway, comparing these draw methods is as old as world.
    Use VBO for drawing geometry and DL for anything else you like.

  2. The driver will not go through all attributes and compare them to create index buffer internally.

There could be several reasons:
VBO state change can be expensive. If you have 10,000 VBOs and each is for rendering a few quads, then rendering all those will be slow. Make 1 big VBO for all.
Perhaps DL are slow if used in this fashion as well.

Using certain formats like double or byte for vertices or what have you can force the driver to convert the data live, every time you render with your VBO.
For DL, it would be faster in this case.

You can read about VBOs here

and more stuff here

I’ve noticed that for extremely large data sets, creating a display-list with immediate mode rendering (glBegin, glEnd) is much slower than VBOs if you have a newer card (tested on the ATI Radeon 4870x2), but faster than VBOs if you have an older card (ATI radeon x1950).

I think the reason is something else. Maybe I bad told about my VBO project?

This is a Delphi code:
var vertexBuffer:GLInt;

Vertex=array[0…1] of GLFloat;

Vertexes:array of Vertex;

Procedure VBOInit;
glGenBuffers(1, @vertexBuffer);

glBindBuffer( GL_ARRAY_BUFFER, vertexBuffer);
glBufferData( GL_ARRAY_BUFFER, sizeof(GLFloat)*(high(Vertexes)+1), @Vertexes[0], GL_STATIC_DRAW );
glVertexPointer( 2, GL_FLOAT, 0, nil);
glBindBuffer( GL_ARRAY_BUFFER, vertexBuffer);

procedure TForm1.GLDirectOpenGLRender(Sender: TObject;
var rci: TRenderContextInfo);
glEnableClientState( GL_VERTEX_ARRAY);
glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer);
glVertexPointer( 2, GL_FLOAT, 0, nil);
glDrawArrays(GL_TRIANGLES, 0, 6);

procedure TForm1.FormCreate(Sender: TObject);
Vertexes[0][0]:=-1; Vertexes[0][1]:=-1;
Vertexes[1][0]:=1; Vertexes[1][1]:=-1;
Vertexes[2][0]:=1; Vertexes[2][1]:= 1;
Vertexes[3][0]:=1; Vertexes[3][1]:= 1;
Vertexes[4][0]:=-1; Vertexes[4][1]:= 1;
Vertexes[5][0]:=-1; Vertexes[5][1]:=-1;


procedure TForm1.FormDestroy(Sender: TObject);

Procedure TForm1.FormCreate use once in project start. Procedure GLDirectOpenGLRender use for rending two triangles. I use GLScene (, but in this project I almost (рассказал&file=&sl=ru&tl=en&history_state0=#ru|en|почти) do not it’s functional.

My project with DL use GLScene only because it do not know about VBO =) and use older display list. if necessary I can show this source code.

“2. The driver will not go through all attributes and compare them to create index buffer internally.”
Sorry, I do not understand, fps would be better if I created indexes for VBO?

Thanks for your answers!!!

As long as you draw 2 triangles there is no sense of arguing about speed :slight_smile:
First, make a scene with 100k triangles - the difference between DL and VBO will become obvious.
Next, use indices (in case your geometry is smooth) and see how caching vertex data helps the performance.

I written:“is GeForce 8XXX generates indexex for for repeating points in VBO geometry?” because in my GeForce 8800 GT with indexes 4446 fps and without indices 4446 fps!

Again, there is no point of measuring speed difference if you have more than 1000 fps. Try more complex data.

Read this: Performance (Humus) and The evils of fps (RTR blog)