Eve - how to display objects as if highlighted?

In Eve, when an object is selected it appears in a special “highlighted” mode where it is “on top” of all other displayed objects. I would like to force some objects to appear like this permanently. Can you tell me how to do that?

Hmmh, there isn’t exactly a good way of doing this. You could call
but I’m not sure what would happen next time this object is REALLY added to selection/highlight. Should be more or less ok, if you can make sure this doesn’t happen. Having th eobject non-pickable is half the story … another half is somehow telling the users not to pass over it in the list-tree widget, which might be hard. I don’t think there is away of switching this off … yet.

Also, what version of root are you using? At some point I spent quite some time to do selected/highlighted outline correctly, that is, without cheating with the depth buffer.

If there is areally specific object/class you want to use this for you could always write your own YourClassGL renderer and force GL to do what you want.



I am using ROOT version 5.34.

So for a specific case I have a class which inherits from TEveStraightLineSet. If I were to create my own <>GL renderer what would I have to change compared to the TEveStraightLineSet one (TEveStraightLineSetGL.cxx )


Hi Alex,

The best solution would be to fake the z / depth coordinate by telling GL to only use some near section of the depth buffer. To do that, subclass from the nearest GL parenet class, probably TEveStraightLineSetGL and only override Draw() like this:

void MyClassGL::Draw(TGLRnrCtx& rnrCtx) const
 Float_t dr[2];
 glDepthRange(dr[0], 0.8*dr[1]); // make it 0.95 if you want it all the way to front


 glDepthRange(dr[0], dr[1]);

This is not tested, I’m rushing off for a doctor’s appointment, just to get you started. Let me know if you want me to make you a more complete example … or you can send me your class and I make you the renderer. Oh, the GL classes need to be ClassDef-ed, too.


Thanks, that worked.