client state and selection buffer

Hi folks,

I have a little odd problem. I’m using selection buffer to pick objects on screen. (I know I shouldn’t be doing that anymore, but I’ll keep it for the time being… :-)).

Anyway, my objects are typically indexed vertex arrays, and i use glVertexPointer/glDrawElements to draw them.

Now, when rendering to the selection buffer it seems that I have to do glEnableClientState(GL_VERTEX_ARRAY) again when enabling my vertex array, even if I have already done so when rendering to the render buffer. If I don’t enable this in the selection buffer, I don’t get any hits.

Is it supposed to be that way, i.e does the selection buffer keep its own client state, or should I start debugging my state managment code to see if the vertex array client state isn’t enabled after all?