Pangolin icon indicating copy to clipboard operation
Pangolin copied to clipboard

ImageView overlay using extern_draw_function and GlFont breaks when zooming

Open NikolausDemmel opened this issue 6 years ago • 1 comments

I have an ImageView to display images and draw some annotations using extern_draw_function. Zooming works as expected for most cases (e.g. glDrawLine or glDrawCirclePerimeter).

But when I use pangolin::GlFont::I().Text("foo").Draw(10, 20) to draw some text on the overlay, it is drawn over neighboring displays when zooming.

Am I doing it wrong, or might this be a bug?

No zoom:

screenshot 2018-10-30 00 03 26

Zooming into the right image view leaves text (numbers) overlayed over left image as well as 3d viewer, but not circles and lines.

screenshot 2018-10-30 00 04 26

NikolausDemmel avatar Oct 29 '18 23:10 NikolausDemmel

Hmm - this has to do with the method by which I attempt to render text in pixel units (by changing the viewport). This is really a bug in GlText::Draw() where I shouldn't be calling DisplayBase().Activate();

stevenlovegrove avatar Nov 19 '18 03:11 stevenlovegrove