Hi,

I am not clear as to how do we use glSelectBuffer in pyopengl.

So far, I have tried to convert it to python and my attempt is as follows:
Python code:- http://sprunge.us/JPUj?python
C++ code:- http://sprunge.us/YPhU?c++

 
Corresponding C++ code is (If you want just the part required):-
// Space for selection buffer
static GLuint selectBuff[BUFFER_LENGTH];
//Something else
//Setup selection buffer
glSelectBuffer(BUFFER_LENGTH, selectBuff);

//Some more stuff, and its now used in the code like
hits = glRenderMode(GL_RENDER);
//Other stuff..
if(hits > 0){ //something's been selected
        unsigned int choiche;

        // fi there's more than one figure (or control point) selected, take the top one
        if (hits > 1)
          choiche = selectBuff[(hits*4)-1];
        else
          choiche = selectBuff[3];

        cpsel = false;
        if (win == 1) {
          selWin1(selectBuff);
        }
        else if (win == 2){
             sel = true;
             if (choiche < figureSet.size()) // figure selected
                selected = choiche;
             else{ // it's a control point
                cpsel = true;
                cp = choiche;
             }
        }
     }
___________________________________________________________




A quick reply will be highly appreciated as I have a deadline to submit a project.
--
Regards,
Abhijeet Rastogi (shadyabhi)
http://www.google.com/profiles/abhijeet.1989