-
Senior Member
OpenGL Guru
Re: glLoadName.. is there a limit
>>But it seemed to me that the original question was about the stack's depth rather than about the number of possible names.
Right, and the first answer from Michael gave already the right clue. Nevertheless, you won't hit the maximum stack depth using glLoadName ever.
-
Junior Member
Regular Contributor
Re: glLoadName.. is there a limit
Thanks for all the help. It seems when we do a glLoadName we simply replace the top of the stack , which means we just lost the entry for last object... so if we do 1 glPushName and 10 glLoadName we will effetively have 1 entry on the stack...? so that means we will get the same name for every selection hit that will occur...???
-
Senior Member
OpenGL Guru
Re: glLoadName.. is there a limit
Pseudo algorithm:
1.) You call glLoadName before you draw the object.
2.) Draw the object. If the object would set pixels in the current view, you get the top of name stack element in the selection buffer.
3.) Goto 1. while not all named objects have been drawn.
That means the selection buffer grows which each hit and you always can check which object triggered that. No need for glPushName and glPopName as long as you don't have hierarchical selection requirements.
-
Junior Member
Regular Contributor
Re: glLoadName.. is there a limit
Ok...now iget it... thanx a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules