I am trying to get OpenGL to render stuff with MSAA. I learned from a tutorial that this can be done with OpenGLPixelFormat, like this:
// Setup a pixel format object to tell the context what level of
// multisampling to use.
OpenGLPixelFormat pixelFormat;
pixelFormat.multisamplingLevel = 4; // Change this value to your needs.
m_openGL.setPixelFormat(pixelFormat);
m_openGL.setRenderer(this);
m_openGL.setContinuousRepainting(true);
m_openGL.attachTo(*this);
But it seems to have no effect. Am I doing it wrong or is there another way to achieve AntiAliasing?
I think it’s also necessary to call openGLContext.setMultisamplingEnabled (true); in order to enable multisamplig at the level specified in the OpenGLPixelFormat.
That said, multisampling doesn’t seem to work on Linux at all. I’ll investigate whether we can add that feature.
Ok thanks for the heads up! I will test it later on my Windows machine.
I don’t know if this is known to the devs, but there seems to be another issue with OpenGL on Linux when running with NVIDIA Gtx cards, where they output thousands of FPS, which locks the GUI when using v-sync. See this post for details. (Sry this is probably not the right place to report this.)
We just fixed an issue where the screen was being repainted unnecessarily:
There’s a (small) chance that this is related to the performance issue you’re seeing. Please could you try out the latest develop branch and see whether the issue is resolved there?