Results 1 to 1 of 1

Thread: antialiasing a scene under QGLWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default antialiasing a scene under QGLWidget

    Hi, I have a strange problem; I suppose the cause is a particulary behavoiur of QT;
    In initializeGl I have this code:
    Qt Code:
    1. ......................
    2. cout << " widget---------> " << this << endl;
    3. printf("antialiasing");
    4. glShadeModel(GL_SMOOTH);
    5. glClearColor( 0.0, 0.0, 0.0, 0.0 );
    6. glEnable(GL_DEPTH_TEST);
    7. glEnable(GL_BLEND);
    8. glEnable(GL_POLYGON_SMOOTH);
    9. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    10. glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
    11. ........................
    To copy to clipboard, switch view to plain text mode 
    When I launch app, in console I can read 4 print 'antialising'; I have 4 QGLWidget.....
    The scene doesn't appear aliased! But I can save my scene and obtain a pixmap of this (pixmap of widget4); then, the image of pixmapping that widget appear aliased;
    Qt Code:
    1. renderPixmap(320, 280, FALSE);
    To copy to clipboard, switch view to plain text mode 
    the renderPixmap I know that must do what happen when I launch my app (initialize + paintGL); why that diference? (furthermore, I can't understand the cause of those diagonal lines, but the scene is aliased!) thanks
    Attached Images Attached Images
    Regards

Similar Threads

  1. QGLWidget with multiple monitors
    By Rayven in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2006, 10:28
  2. QGLWidget updateGL()
    By Lele in forum Qt Programming
    Replies: 7
    Last Post: 30th May 2006, 15:08

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.