Hi,
Is there a limit on how many names can we push on the name stack using glLoadName in opengl (i am doing a selection problem here)
thanx
Hi,
Is there a limit on how many names can we push on the name stack using glLoadName in opengl (i am doing a selection problem here)
thanx
maybe glGetIntegerv( GL_MAX_NAME_STACK_DEPTH, ... ) ?
- Michael Steinberg
glLoadName replaces the top-of-stack name. it does not increment or decrement the name stack position. glPushName and glPopName do.
The maximum number of possible names is 2^32-1.
So, the basic question should have been, how many names can we push onto the stack.
- Michael Steinberg
Well i guess your right. The question should have been that..anyway thanks for the help.
2^32 is the number of names that we can put in the stack ?glLoadName replaces the top-of-stack name. it does not increment or decrement the name stack position. glPushName and glPopName do.
The maximum number of possible names is 2^32-1.
Thank you for the moment
Best regards
KurtCob
Try glGetIntegerv to retrieve the value of GL_MAX_NAME_STACK_DEPTH.
If you look at the red book (State variables appendix), the minimum depth of the name stack is said to be 64 (it looks pretty much like 2^6 rather than 2^32).
On Tom Nuydens' site, in the hardware section, http://www.gamedeveloper.org/delphi3...e/index.shtml, you can search for the name stack's depth for several chipsets, you'll find:
Geforce2 GTS: 128
Radeon: 128
i.e. 2^7.
I don't think you can push 4 billion names onto the stack.
Moz, the number of names you can place on the stack is the whole range of an integer (excluding zero, therefore 2^32-1). An integer is, in OpenGL at least, 32 bits long.
64 as you mentioned, is the (minimum) number of names you can push into the stack.
>>The maximum number of possible names is 2^32-1.
Yes, what I said is that the name is an 32 bit unsigned int. The name stack itself is implementation dependend and guaranteed not to be smaller than 64 entries.
So if you really use glLoadName you can have as many as 2^32-1 different objects in the scene because the name stack pointer is never incremented or decremented.
I actually have not yet seen a necessity to use glPushName and glPopName at all except for the bottom name stack element.
Ok, I get your point now.
But it seemed to me that the original question was about the stack's depth rather than about the number of possible names.