If it’s like OpenGL C code then genlists returns the first integer handle in a contiguous list.
So you need to take the return value and assign it to element zero of your display list array, then increment it and apply in to the second element then increment it and apply it to the third etc. As you can see you don’t really need an array.
Dorbie’s response still brings up a good point. How is glGenLists filing the values in your displayList array?
I’m not familiar with gl4Java so maybe there’s someplace else where you tell it what array to fill, but from the code you gave, it appears that they have no association.
Yes it sure looks that way. I assume the wrapper is doing exactly what the C call does and the solution is as I have suggested. The whole notion of using an array when the name allocator gives you the base name in a contiguous list seems redundant as I pointed out.
No, quads aren’t converted to triangle strips unless the driver does some sort of optimization underneath. You need to be sure that all the vertices of your quad are coplanar, otherwise the results are undefined.
Display lists can be stored in the graphics memory, but again, it’s all a decision up to where the driver decides to put them.
There is no real limits to the number of commands that can be put into a display list. I believe that if you start putting too much in them, it will slow things down, though.
The only limit on the number of lists you can have is the max value of GLuint, which is pretty large. Again, in practice it may start slowing down if you get too many as there would be less chance to get stored in graphics memory.
Regarding your problem, you still haven’t told us HOW the values for your displayList array are getting set. I’m guessing your problem is stemming from not correctly setting those values.