glPushName() scope..

Started by
2 comments, last by Brother Bob 15 years, 4 months ago
This may be really stupid question but I'd be grateful if someone could clarify this. Basically I'm adding in object selection in my project. I have a number of classes, worldmanager, viewer, scene, and object. I'm trying to name the objects, new instances of objects get created in the scene class so I was wondering if use glPushName(); to name an object in the scene class, am I then still able to check for hits in the viewer class for instance or would I need to check / process the hits in the same class as where I'm naming objects?
Advertisement
OpenGL knows nothing, and don't care, about the structure of your program when it comes to scopes and classes and such constructs.
Thanks for the reply,

So in that case, if I setup object names in one class and test for hits of an object in other it won't matter.
Correct; as it doesn't know about objects, it cannot know if you load names and process hits in different ones.

This topic is closed to new replies.

Advertisement