vbo fail with huge vertex num (>10million vertexes

it works fine under 5 million vertexes
every step glGetError returns no error, but when call

glDrawElements(GL_QUADS, 4*pBuf->m_nQuadCnt, GL_UNSIGNED_INT, (char *) NULL);

it crash

what can i to do with this problem? :frowning:
thanks

You have not given us enough info.
Which hardware are u running this on? May be u r exceeding the memory limits?

it is nvidia geforce gt 420
driver date : 2011/4/7
driver version : 8.17.12.6812

how to judge whether glBufferDataARB malloc too many vram?
there is no return error like GL_OUT_OF_MEMORY ect.

i split it into blocks, every block have maximum vertex limit(say, like
65535),then use glDrawElements(GL_QUADS,…, GL_UNSIGNED_SHORT,(char *) NULL) instead of glDrawElements(GL_QUADS,…, GL_UNSIGNED_INT,(char ) NULL) .(because i saw nvidia vbo white papar ,it says 16bit index can gain
2
x speed),but it still crash in huge models…
is sombody meet same problem?
can anybody help me?

i am perplexed at the problem.
i have to query vedio card memory, if glBufferDataARB exceed it, then not use vbo to draw the model

You can check what the maximum is with glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value)
and
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &value)

Are you saying you can’t render more than 65535 vertices at a time? That seems rather low.

GL_MAX_ELEMENTS_VERTICES/GL_MAX_ELEMENTS_INDICES are a hint of the maximum number of elements issued in one go that will give maximum performance.

You’ve shown how many indices are being used, but how many vertices are being used + how many bytes does each vertex consist of? Is each index value pointing to a unique vertex? If you have 5 million unique vertices + each is taking 64 bytes, that’s 320 MB used for vertices + 20 MB for index data.

Are you allocating the right sized buffer objects? Do you have index values referencing vertices that are beyond the range of the buffer object containing them? If so, you may encounter problems at the draw call.

Maybe seeing some more code fo buffer object allocation + vertex pointer setup might be helpful.

GL_MAX_ELEMENTS_VERTICES/GL_MAX_ELEMENTS_INDICES are a hint of the maximum number of elements issued in one go that will give maximum performance.

Also, note that the hint itself only applies to glDrawRangeElements.