Vertex limits?

What are the limits on the amount of vertices for one glVertexPointer() pointer
and the number of subsequent times you can call glDrawArrays() using the same previous glVertexPonter() call?

I break down at about 300 subsequent glDrawArrays calls of anywhere from 5 to 1000 verticies each time.

The total memory needed is about 1.4 MB (151673 * (3 xyz) * (4 float) /1024/1024)
I don’t think thats too much. I think I have 24 MB available

It will take about 6000 calls to exhaust the array of vertices

(BTW the vertices represent coastal waterlines)

glVertexPointer(3, GL_FLOAT, sizeof(glV3f), cVerts);
for (i=0; i<cNum; i++)
{
glDrawArrays(GL_LINE_STRIP, index, cLengths[i]);
index+=cLengths[i];
}

this also breaks down…

for (i=0; i<cNum; i++)
{
glVertexPointer(3, GL_FLOAT, sizeof(glV3f), &cVerts[index]);
glDrawArrays(GL_LINE_STRIP, 0, cLengths[i]);
index+=cLengths[i];
}

Probably you are suffering with memory leak problem.

I have tested my application (PocketPC and Symbian OS) with more than 100.000 vertices, calling glDraw a lot of times.

Check every place you alloc a memory and dont disalloc

or, it also can be the ammount of memory your device can handle. Some devices have a small heap memory

Thank you for the suggestions. I was hoping you were right about the heap or memory segments.
My memory is not dynamically allocated.
I loaded the vertices into code, then compiled them into the application
so it will start faster.
I was able to exercise all the vertex memory locations.
using a simple sqrt() on xyz to get the sphere radius.
every vertex passed.
That tells me my vertex array is not too big for my platform.

I was able to run the code on my PC and another embedded device.
the ipod is the only one I cant get to work.

Any other suggestions?
Is there a way to flush or render the vertices without swapping buffers?

I read something about stalling the pipeline.
When I run my application only calling glDrawArrays() when there are more than 133 vertices it works.
The problem is all the good data comes in less than 133 vertecies!

This seems to point back to a vertex limit.

The easiest way to find out if there is a vertex limit should be to ask your platform provider.

Thank you. I agree. It is probably the platfoem and not OpenGL ES.
I am able to run the same code on another embedded platform; and on my PC.
I also get the same behaviour using glBindBuffer and glBufferData.

Is there a way to query GPU memory utilization?
Are there any guides to optimize GPU memory management?

Thanks again.

I am just curious, Does adding a glGetError() immediately after glVertexPointer & glDrawArray return an error code?

glGetError yields GL_NO_ERROR
and once the limit is reached each subsequent (and "successful’) call to glDrawArrays takes over one whole second.

I have been able to excercise the entire vertex buffer using a VBO and I still get the same performance.

I believe I proved the code and memory to be correct since I can draw a different subset of the the data each frame accounting for all the vertices in about 10 frames. just cant do them all in one frame. This is with the vertex data already loaded (It think - assuming on the ipod, a VBO is actually on the graphics chip memory already)

Thank you for the thought. and I forgot that the program still runs. just in an obviously unacceptable manner. one second per glDrawArray call.

Is this what is meant by stalling the pipeline?
Is it possible even though I am using VBO’s the data isn’t really on the other side of the platform/graphics bus?

as you can already tell I am a noob, so feel free to state the obvious.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.