Selection Problem

I’m writting a GUI using opengl and using the selection methods of GL. The names I use for my objects (widgets) are the 32 bit pointers cast as a GLuint. When I go through the hit list, I just recast as UI_element* and I can then call that objects MouseOver function.

The problem is that I do development on my laptop (32 bit platform) when I travel and my desktop (64 bi platform) when I’m at home. My selection code doesn’t work on the 64 bit machine becase the name stack only accepts 32bit names and when they get recast back they are useless as pointers.

Is there a way get the name stack to push a 64 bit int or do I need to come up with a hash-like function to translate between the two? Is there some kind of GLulong I can use?



I think it was possible to push a name twice, but it has been a long time for me. It would return 2 values for a hit.

great idea, I had forgot about that. Thanks!