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 34317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:03:33+00:00 2026-05-10T14:03:33+00:00

Multisampling is a way of applying full screen anti-aliasing (FSAA) in 3D applications. I

  • 0

Multisampling is a way of applying full screen anti-aliasing (FSAA) in 3D applications. I need to use multisampling in my OpenGL program, which is currently embedded in a wxWidgets GUI. Is there a way to do this? Please respond only if you know the detailed steps to achieve this.

I’m aware of enabling multisampling using WGL (Win32 extensions to OpenGL). However, since my OpenGL program isn’t written in MFC (and I want the code to be multi-platform portable), that’s not an option for me.

  • 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. 2026-05-10T14:03:34+00:00Added an answer on May 10, 2026 at 2:03 pm

    I finally got Multisampling working with my wxWidgets OpenGL program. It’s a bit messy right now, but here’s how:

    wxWidgets doesn’t have Multisampling support in their stable releases right now (latest version at this time is 2.8.8). But, it’s available as a patch and also through their daily snapshot. (The latter is heartening, since it means that the patch has been accepted and should appear in later stable releases if there are no issues.)

    So, there are 2 options:

    1. Download and build from their daily snapshot.

    2. Get the patch for your working wxWidgets installation.

    I found the 2nd option to be less cumbersome, since I don’t want to disturb my working installation as much as possible. If you don’t know how to patch on Windows, see this.

    At the very least, for Windows, the patch will modify the following files:

    $(WX_WIDGETS_ROOT)/include/wx/glcanvas.h $(WX_WIDGETS_ROOT)/include/wx/msw/glcanvas.h $(WX_WIDGETS_ROOT)/src/msw/glcanvas.cpp 

    After patching, recompile the wxWidgets libraries.

    To enable multisampling in your wxWidgets OpenGL program, minor changes to the code are required.

    An attribute list needs to be passed to the wxGLCanvas constructor:

    int attribList[] = {WX_GL_RGBA,                     WX_GL_DOUBLEBUFFER,                     WX_GL_SAMPLE_BUFFERS, GL_TRUE, // Multi-sampling                     WX_GL_DEPTH_SIZE, 16,                     0, 0}; 

    If you were already using an attribute list, then add the line with GL_SAMPLE_BUFFERS, GL_TRUE to it. Else, add this attribute list definition to your code.

    Then modify your wxGLCanvas constructor to take this attribute list as a parameter:

    myGLFrame::myGLFrame    // Derived from wxGLCanvas (     wxWindow *parent,     wxWindowID id,     const wxPoint& pos,     const wxSize& size,     long style,     const wxString& name ) : wxGLCanvas(parent, (wxGLCanvas*) NULL, id, pos, size, style, name, attribList) {     // ... } 

    After the wxGLCanvas element is created, multisampling is turned on by default. To disable or enable it at will, use the related OpenGL calls:

    glEnable(GL_MULTISAMPLE); glDisable(GL_MULTISAMPLE); 

    Multisampling should now work with the wxWidgets OpenGL program. Hopefully, it should be supported in the stable release of wxWidgets soon, making this information irrelevant 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to just use multisampling on just lines drawn with OpenGL
In an application I try to use multisampling for anti-aliasing on some simple 2D
I want to use multisample anti-aliasing and save what I draw to a BMP.I
I have been unable to find a way to anti-alias my rendering on iPhone
I'm reading OpenGL Superbible 5th ed. I've come across several terms which although explained
I'm trying to get multisampling to work in my OpenGL ES app. Framebuffer setup
Is it possible to use multisampling on iPad ? Apple's documentation say: iOS4.0 and
I am very interested in understanding how multisampling works. I have found a large
I'm experimenting w/ improving the resolution of an OpenGL ES based app. Apple mentions
I just switched my OpenGL drawing code from drawing to the display directly to

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.