Archived

This topic is now archived and is closed to further replies.

Maximum OpenGL Objects Limit, or just Picker Mania?

This topic is 5332 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In NeHe''s tutorial 32, he notes: "It is VERY important to note that you can have a maximum of 64 objects on the screen (0-63). If you try to render 65 or more objects, picking becomes confused, and odd things start to happen. Everything from objects randomly exploding to your computer crashing. It''s a physical limit in OpenGL (just like the 8 lights limit)." I could have sworn OpenGL allowed a greater limit then 64 contiguous objects being rendered at once, or am I the one mistaken? Is this only a problem if youre going to use the picker routines? Or is this simply a hardware limitation for ''safety'' reasons, whereas you can go past it all you want but functionality no longer is guaranteed? The reason I ask, I''m working on a digital model converter to convert from formats (such as DXF, 3DS, MDL, PLY, AV2, etc) into a format I can work with easier (and quicker) from inside other OpenGL applications, and as such, want the editor to be able to ''show'' me the model (using OpenGL) so I can modify certain characteristics of it and view it on the fly. I can see this limitation being a problem, since I wanted to place a small sphere (node) at every vertex for easier viewing..but that means any model imported that has over 64 vertexes would theoretically crash OpenGL. Is this correct? And if so, anybody got an idea on how I could do this and get around the limitation? I have a feeling this limitation only exists when using the picker routines, but dont want to accidently thrash the machine around in testing. Thanks again in advance. *Moving Forward Along the Backward Walkway of Technology*

Share this post


Link to post
Share on other sites
64 is the minimum depth of the name stack, which holds the object hierarchy. For example, Car->Wheel->Bolt is three objects in the hierarchy, so when you select a bolt, the stack tells you which wheel the bold is attached to, and to which car the wheen is attached. Each name is a GLuint, which limits the number of different objects to be picked to at least 4.2 billions.

Share this post


Link to post
Share on other sites
Thanks again guys. That answer the question quite well, I''ll just disable the picking routines and use my own methods then Cheers

*Moving Forward Along the Backward Walkway of Technology*

Share this post


Link to post
Share on other sites