Results 1 to 1 of 1

Thread: [QtOpenGL] gl_blend vs MultiSampled

  1. #1
    Join Date
    Aug 2008
    Posts
    2
    Thanked 1 Time in 1 Post

    Default [QtOpenGL] gl_blend vs MultiSampled

    [QtOpenGL] gl_blend vs MultiSampled
    Hi,

    I'm new in OpenGL and I made some tests with Qt example about "Aliasing".

    I would like to be sure about my results.

    It's seem the result of "Anti-aliasing" to be more beautiful with the "gl_blend" method

    Graphic card : ATI Mobility Radeon HD 4650

    my results :



    I test the different settings of the drivers ATI :
    • wide-tent
    • box
    • narrow-tent
    • edge-detect


    with differents samples (setSample(2/4/8))

    for me the best "Anti-aliasing" is without multisampled.

    Here the code for my test.


    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication a(argc, argv);
    4. QGLFormat format = QGLFormat::defaultFormat();
    5. format.setSampleBuffers(false);
    6. //format.setSamples(2);
    7. //format.setSamples(4);
    8. format.setSamples(8);
    9. MyGlWindow*_glwindow= new MyGlWindow(format);
    10. _glwindow->show();
    11. return a.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 


    Qt Code:
    1. void MyGlWindow::initializeGL()
    2. {
    3. if(format().sampleBuffers())
    4. {
    5. glEnable(GL_MULTISAMPLE);
    6. }
    7. else
    8. {
    9. glEnable(GL_BLEND);
    10. glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    11.  
    12. glEnable (GL_LINE_SMOOTH);
    13. glEnable (GL_POINT_SMOOTH);
    14. glEnable (GL_POLYGON_SMOOTH);
    15. glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
    16. glHint (GL_POINT_SMOOTH_HINT, GL_DONT_CARE);
    17. glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
    18. }
    19. }
    To copy to clipboard, switch view to plain text mode 


    To finish, is it normal that we can't get the same "anti-aliasing" result with "GL_MULTISAMPLE" ?


    thx.
    Attached Images Attached Images

Similar Threads

  1. QtOpenGL/qgl.h change between 4.7.3 and 4.8
    By hml in forum Qt Programming
    Replies: 6
    Last Post: 28th January 2012, 18:38
  2. QtOpenGL GL_BGR not defined
    By ^NyAw^ in forum Qt Programming
    Replies: 16
    Last Post: 30th August 2011, 16:41
  3. capacity to use SampleBuffers in QtOpenGL
    By aalexei in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2011, 16:37
  4. image processing with qtopengl
    By sisilet in forum Qt Programming
    Replies: 1
    Last Post: 10th June 2010, 21:42
  5. QtOpenGL example problem on wince6
    By lamosca in forum Installation and Deployment
    Replies: 1
    Last Post: 21st April 2010, 16: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.