PDA

View Full Version : QGLWidget with text - zoom in / zoom out



h123
14th November 2008, 18:00
Hi,

I need the zoom in/out facility in QGLWidget, which has text drawn on it with other primitives.

When I zoom in/out the primitives get minimized/maximized but the text remains at the same size. I want to have text size should reduce/increate with zoom in/out.

Thank you.

wysota
16th November 2008, 09:56
This question is strictly related to OpenGL itself and not to Qt... If you draw text using OpenGL, use OpenGL means to scale it. If you use Qt to draw text over an OpenGL scene then the text is independent of the scene and its scale, so you have to recalculate its new size and position manually.