[Qt-interest] Problem using OpenGL from Qt Application
Donal O'Connor
donaloconnor at gmail.com
Tue Oct 20 18:35:23 CEST 2009
How about adding the line that Rainer suggested :)
You have no projection matrix set up. I'm not sure what the default is, but
it could be from 0 - 1, so you clip when you go below the Z axis of -1.
Donal
On Tue, Oct 20, 2009 at 5:23 PM, Sujan Dasmahapatra <
sujan.dasmahapatra at gmail.com> wrote:
> 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
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091020/1a631afc/attachment.html
More information about the Qt-interest-old
mailing list