[Qt-interest] Problem using OpenGL from Qt Application
Rainer Wiesenfarth
Rainer.Wiesenfarth at inpho.de
Tue Oct 20 16:36:45 CEST 2009
From: Sujan Dasmahapatra
> [...]
> void GraphicsView::paintGL()
> {
> glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
> glLoadIdentity();
> glTranslated(0.0, 0.0, -10.0);
> [...]
> }
> [...]
Correct me if I am wrong, but the translate causes all geometry getting
clipped, doesn't it? I would assume it works if you add
glMatrixMode (GL_PROJECTION);
glOrtho (-20.0, 20.0, -20.0, 20.0, -20.0, 20.0);
glMatrixMode (GL_MODELVIEW);
between glClear() and glLoadIdentity().
Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth
--
INPHO GmbH * Smaragdweg 1 * 70174 Stuttgart * Germany
phone: +49 711 2288 10 * fax: +49 711 2288 111 * web: www.inpho.de
place of business: Stuttgart * managing director: Johannes Saile
commercial register: Stuttgart, HRB 9586
Leader in Photogrammetry and Digital Surface Modelling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3438 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091020/af22741a/attachment.bin
More information about the Qt-interest-old
mailing list