PDA

View Full Version : vbos performance issues.



mdog1234
02-03-2004, 04:55 AM
When I render any object I get a frame rate of about 823 fps. When I put lighting on the frame rate drops by half to around 420 when i put textures and lights on the frame rate drops another 25% to 318. I have binded 3 vertex buffer objects like this
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBOVertices );
glVertexPointer( 3, GL_FLOAT, 0, (char *) NULL );
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBOTexels );
glTexCoordPointer( 2, GL_FLOAT, 0, (char *) NULL );
glBindBufferARB( GL_ARRAY_BUFFER_ARB, VBONormals );
glNormalPointer( GL_FLOAT, 0, (char *) NULL );

My question is that is there a way to not see such a performance drop when lights and textures are on? Is this normal or is the fame rate low because I am using 3 vbos.

Relic
02-03-2004, 05:06 AM
Are you sure it's because of the VBO's?
It could also be lighting bound and/or raster bound (fillrate).
Does is behave the same with standard vertex arrays?
What's your hardware?
Window size? Does texturing get a lot faster when you decrease the window size?
Number of lights?
Number of vertices?

(318 fps is pretty fast if you ask me. http://www.opengl.org/discussion_boards/ubb/wink.gif)

zeckensack
02-03-2004, 08:03 AM
Let's count how many floats you're transferring per vertex.

Position only: 3 floats, 823 fps
Plus normals: 6 floats, 420 fps
Plus texcoords: 8 floats, 318 fps

823*3/6=411.5, close enough to 420
823*3/8=308.625, close enough to 318

Your application is transfer bandwidth limited.

mdog1234
02-03-2004, 09:22 AM
Originally posted by Relic:
Are you sure it's because of the VBO's?
It could also be lighting bound and/or raster bound (fillrate).
Does is behave the same with standard vertex arrays?
What's your hardware?
Window size? Does texturing get a lot faster when you decrease the window size?
Number of lights?
Number of vertices?

(318 fps is pretty fast if you ask me. http://www.opengl.org/discussion_boards/ubb/wink.gif)
window size is 1024x768
lights = 2
vertices = 20k+
hardware radeon 9700 pro, 2.4 ghz p4

318 is fast for one object but im looking in to the future for whole scenes.

[This message has been edited by mdog1234 (edited 02-03-2004).]

Relic
02-04-2004, 02:36 AM
I'd guess you got all hints to check yourself what limits the performance now.

gemelli_d
02-04-2004, 02:54 AM
Hi, I think you should give a look at this article: http://www.mvps.org/directx/articles/fps_versus_frame_time.htm

maximian
02-04-2004, 08:27 AM
I would suggest significantly increasing the polygon count, or number of objects. Then checking you achieved triangles per second against hypothetical maximum. Small objects fps seem to fluctuate wildly.

For example, a geforce II is rated for 26 million, but depending on whether your vertices are being cached, lights on or off, specular lighting, material attributes, it will be significantly less. For huge models + vbos I get around 6 Million(non tri strips) or 10 Million w/ tri strips + lighting of course.


Supposedly, for Geforce II and up, the first light should be "free" in terms of performance penalty.(Nvidia whitepaper) But depending on your model, and the way you feed vertices, I find this may or may not be true.