Slow VBO Bunnies

Hi all,

OK, here’s the deal.
Loading the stanford bunny OK. Runs at 6.75 mpoly/sec using glDrawElements from system RAM.
Same mesh from a VBO gives me 2.9mpoly/sec. Somewhat less than spectacular.

I’m guessing the fault is with my code (below). Any ideas?

// Setup VBO
glGenBuffersARB( 1, &VBO_VertBuff );
glGenBuffersARB( 1, &VBO_NormBuff );

// Copy Vertex and Normal data into VBOs
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBO_VertBuff );
glBufferDataARB( GL_ARRAY_BUFFER_ARB, NumVertssizeof(CVector3), pVerts, GL_STATIC_DRAW_ARB );
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBO_NormBuff );
glBufferDataARB( GL_ARRAY_BUFFER_ARB, NumVerts
sizeof(CVector3), pVertNormals, GL_STATIC_DRAW_ARB );

loop
{
if( UseSystemRAM ) // 6.75 mpoly/sec
{
glDeleteBuffersARB( 1, &VBO_VertBuff );
glDeleteBuffersARB( 1, &VBO_NormBuff );

  glVertexPointer( 3, GL_FLOAT, 0, pVerts );	
  glNormalPointer( GL_FLOAT, 0, pVertNormals );	

}
elseif( Use VBO ) // 2.9 mpoly/sec
{
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBO_VertBuff );
glVertexPointer( 3, GL_FLOAT, 0, BUFFER_OFFSET(0) );
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBO_NormBuff );
glNormalPointer( GL_FLOAT, 0, BUFFER_OFFSET(0) );
}

glDrawElements( GL_TRIANGLES, NumFaces*3, GL_UNSIGNED_INT, pFaces );
}

system:
-Athlon 24000
-512MB RAM
-GeForce 4200 (det45.23)
-WinXP
-VC6 (spack5?)

[This message has been edited by MojoMagic (edited 09-09-2003).]

[This message has been edited by MojoMagic (edited 09-09-2003).]

[This message has been edited by MojoMagic (edited 09-09-2003).]

As you can see this is very hacky… Even for pseudo-code (sorta).
But is there anything fundamentally wrong with what I’mm doing?

Originally posted by MojoMagic:
system:
-Athlon 24000

Maybe your system is overclocked a bit too much?

Tried with UNSIGNED_SHORT indices and/or indices in an ELEMENT_ARRAY_ARB VBO?

And what is the speed if you use VBO for the indices also?

GeForce 4200 (det45.23) this combo run very slowly, as the driver has a bad optimisation for VBO, try 44.03 they was better imho.

But in my case the perf aren’t so slow, it’s just like a raw pointer in sys ram. Maybe you got another problem, or it’s nvidia drivers misoptimization too.

Dont use 2 Vbos at the same time.
Try an interleaved format.