Results 1 to 2 of 2

Thread: QT - Opengl - setOrtho

  1. #1
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post QT - Opengl - setOrtho

    hi,
    i am creating five QGLWidgets on top of thQ QWidget. For every QGLWidget i am writing initializeGL(), resizeGL(), paintGL().

    in resizeGL() i am setting ortho for five QGLWidgets differently. But is not setting correctly for all five. It is working fine only for one QGLWidget. can any one help me why this hapening like this.

    here i am sending sample code for two QGLWidgets.
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2009
    Posts
    36
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QT - Opengl - setOrtho

    I think you have to use glPushMatrix() and glPopMatrix() to not modify the other GLWidget's Matrix, as OpenGL is a state machine.

Similar Threads

  1. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  2. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 13:36
  3. openGL in Qtopia core
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 18th July 2008, 11:26
  4. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21
  5. OpenGL ES, Qt/11 - Qtopia Core?
    By zelko in forum Qt Programming
    Replies: 0
    Last Post: 3rd May 2007, 10:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.