Results 1 to 4 of 4

Thread: glDrawPixels issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2006
    Posts
    339
    Thanks
    15
    Thanked 21 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: glDrawPixels issue


  2. #2
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: glDrawPixels issue

    Thanks for the link. I did look at that before but there is nothing specific to glDrawPixels. The examples given are for texture mapping.

    I've done this outside of Qt (inside of glut windows) but it is behaving differently here. The real issue is coming up with a way to determine consistently where I should move to (using RasterPos) to get the full image to appear in the QMdiSubWindow via the QGLWidget.

    -- Nisha

  3. #3
    Join Date
    Jul 2007
    Location
    California, USA
    Posts
    62
    Thanks
    17
    Thanked 7 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: glDrawPixels issue -- openGL mistake

    It was an openGL issue. I forgot to add a
    Qt Code:
    1. glViewport(0, 0, width, height);
    To copy to clipboard, switch view to plain text mode 
    in my resizeGL() code before:

    Qt Code:
    1. glMatrixMode(GL_PROJECTION);
    2. glLoadIdentity();
    3. glOrtho(0.0, (double)width, 0.0, (double)height, -1.0, 1.0);
    4. glMatrixMode(GL_MODELVIEW);
    To copy to clipboard, switch view to plain text mode 

    and then the drawing does start in the lower lefthand corner (0,0) as expected.

Similar Threads

  1. QMainWindow Maximization Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 15th March 2007, 13:30
  2. qt3 to qt4 - uic issue
    By hvengel in forum Qt Programming
    Replies: 10
    Last Post: 4th March 2007, 02:59
  3. Dialog and code design issue
    By Gopala Krishna in forum Qt Programming
    Replies: 1
    Last Post: 24th September 2006, 17:54
  4. Replies: 5
    Last Post: 22nd September 2006, 08:04
  5. A Design Issue...
    By nupul in forum Qt Programming
    Replies: 6
    Last Post: 4th May 2006, 17:41

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
  •  
Qt is a trademark of The Qt Company.