View Full Version : glLockArraysEXT(start, size)

05-19-2001, 11:59 AM
what does the size parameter specify? Why is a larger number slower than a small one?

05-19-2001, 02:02 PM

05-20-2001, 02:14 AM
If I read the spec, i come to the conclusion that a larger number must be faster, because more elements in the array will be compiled.

In my cases I have an array with +/- 6000 Vertices, and if I use
glLockArraysEXT(0,1) the framerate is about 120 FPS
glLockArraysEXT(0, 6000) the framerate is only 60 fps, just the same if I would disable glLockArraysEXT(); (so render the array without locking it)

05-20-2001, 09:21 AM
The size parameter is the number of elements you want locked. Smaller numbers are faster for you because the driver probably expects you to use all the elements that are locked. Therefore, it probably T&L's the elements when you call glLockArrays. You probably shouldn't call glLockArrays and then use elements outside the range you specify.

05-20-2001, 09:34 AM
But I do use all the elements I locked

05-20-2001, 12:27 PM
using glLockArrays(0,1) should give incorrect rendering results thus for 6000 vertices this is useless, perhaps it works on your card but for others?
6000 vertices is quite a lot to lock in one hit. i believe the optimal is usually lower about 4000