VBO + 43.51 = brilliant

VBO + 43.51 not only matches VAR in performance, it is faster.

Rendering a 2D patch gives me this
Verts_____129x129_____257x257

StdGL_____259fps______64fps
VAR_______373fps______145fps
VBO_______412fps______151fps

Putting indices in a buffer makes
no difference though.

Anyway, this is so great, I just had
to share my enthusiasm.
Great job NVidia and ATI.
Cheers.

(Zak, thanks for the driver-link)

[This message has been edited by fritzlang (edited 04-14-2003).]

What’s the score when you draw thousands of them?

(Edit - )

[This message has been edited by deadalive (edited 04-14-2003).]

Originally posted by JD:
What’s the score when you draw thousands of them?

Rendering the 129 x 129 patch 2000 times
(=66564000 triangles)gives me this:
StdGL_____0.1408fps
VAR_______0.3476fps
VBO_______0.3477fps

This is for-looping glDrawElements 2000 times, I did not use glMultiDraw…

Cheers

Yup, as you can see the speeds are about the same now. I think std gl path might further come close to the other two in real world situations.

posted by JD:
Yup, as you can see the speeds are about the same now. I think std gl path might further come close to the other two in real world situations.

of course. in real world situations geometry transfer isn’t always the bottleneck, so you won’t always get a 2x performance increase as fritzlang’s test app did.

i really must be doing something wrong here. i’m just drawing a highly tesselated sphere, about 300,000 vertices. i’m definitely geometry bound. my vertices consist of 3 floats for a location, 3 floats for a normal, and 2 floats for a tex coord. i’m drawing with glDrawRangeElements, and i’m using a buffer object for the indices. i specify STATIC_DRAW for the usage parameter in glBufferDataARB. i get 20 frames or so on a geforce 4 ti 4400 with the 43.51 drivers, both with standard vertex arrays and with vbo. that’s actually a slight drop from the 43.45 drivers. any ideas?

fritzlang, could you email me that test of yours, or post it online somewhere? if it’s the case that the drivers are just doing something screwy i don’t really mind for now. i just want to know if the problem is my code, and i suspect it is.

Originally posted by SThomas:
fritzlang, could you email me that test of yours, or post it online somewhere?

What i do i very simple:

// m_pfVertices are the 129 x 129 x 2 floats for grid points
// m_pusIndicesFullRes are tri strip unsigned short indices

// init
m_uiVertexBufferId = 1;
glBindBufferARB(GL_ARRAY_BUFFER_ARB, m_uiVertexBufferId);

if (!glIsBufferARB(m_uiVertexBufferId))
return false;

glBufferDataARB(GL_ARRAY_BUFFER_ARB, m_uiNumVertices * 2 * sizeof(float), m_pfVertices, GL_STATIC_DRAW_ARB);

m_uiIndexBufferId = 2;
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m_uiIndexBufferId);

if (!glIsBufferARB(m_uiIndexBufferId))
return false;

glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m_uiNumIndicesFullRes * sizeof(unsigned short), m_pusIndicesFullRes, GL_STATIC_DRAW_ARB);

// draw
glBindBufferARB(GL_ARRAY_BUFFER_ARB, m_uiVertexBufferId);
glVertexPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(0));
glEnableClientState(GL_VERTEX_ARRAY);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, m_uiIndexBufferId);
glDrawElements(GL_TRIANGLE_STRIP, m_uiNumIndicesFullRes, GL_UNSIGNED_SHORT, BUFFER_OFFSET(0));
glDisableClientState(GL_VERTEX_ARRAY);

I’ve never tested this code on any other machine than mine but please give it a
try. This is nvidia only.
//EDIT: LINK_REMOVED//

There are two exe:s, one using STD arrays and one using VBO to draw a 129 x 129
GL_LINE_STRIP patch. You can turn off the reference coord-sys using the ‘G’ key to increase fps.

Cheers.

[This message has been edited by fritzlang (edited 04-15-2003).]

[This message has been edited by fritzlang (edited 04-22-2003).]