Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:45:43+00:00 2026-06-17T14:45:43+00:00

How do I enable multisampling when I create the window? How should I initialize

  • 0

How do I enable multisampling when I create the window? How should I initialize OpenGL to match?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:45:44+00:00Added an answer on June 17, 2026 at 2:45 pm

    Took me a while to figure this one out.

    The trick is to use a QSurfaceFormat in your QWindow‘s constructor like so:

    setSurfaceType(QWindow::OpenGLSurface);
    QSurfaceFormat format;
    format.setSamples(4);    // Set the number of samples used for multisampling
    setFormat(format);       // Note we set the format on the window...
    create();                // Create the window
    
    context = new QOpenGLContext(this);
    context->setFormat(format);    // ...and set the format on the context too
    context->create();
    

    And later, when initialising OpenGL:

    glEnable(GL_MULTISAMPLE);    // This seems to be the default given the configuration above, but just in case that's not universal...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to enable multisampling when drawing triangles like on the following picture:
How do I enable/disable the Delete button on the List window based on data
When im using this following code: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 6); and then i enable multisampling,
Goal: Enable closing of the application's window(s) independently without affecting others. The application is
To enable single sign-on for a web application and a web application in a
By enable the option called Application supports iTunes file sharing , I can integrate
i enable hl-mode in global scope with the following code. (global-hl-line-mode t) to turn
I'd like to enable SVNAutoversioning for one repository only. Would this work? <Location /repos/>
I am trying to enable digests to be sent by the Buddypress group email
I would like to enable SOAP on my PHP5/Centos/Apache server. I have full access

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.