Pangolin
Pangolin copied to clipboard
ImageView overlay using extern_draw_function and GlFont breaks when zooming
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:

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

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();