[Qt-interest] Problem using OpenGL from Qt Application
Sujan Dasmahapatra
sujan.dasmahapatra at gmail.com
Tue Oct 20 18:23:53 CEST 2009
I am not sure ! Can somebodyelse check if what I wrote is right or wrong !
Thanks
On Tue, Oct 20, 2009 at 8:06 PM, Rainer Wiesenfarth <
Rainer.Wiesenfarth at inpho.de> wrote:
>
> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091020/a716c09a/attachment.html
More information about the Qt-interest-old
mailing list