PDA

View Full Version : Selection Problem



scourage
08-14-2005, 01:41 PM
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?

Cheers,

Bob

V-man
08-15-2005, 07:36 PM
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.

scourage
08-20-2005, 03:47 AM
great idea, I had forgot about that. Thanks!

cheers,

Bob