QML Canvas3D multisampling
Unsolved
QML and Qt Quick
-
How do I enable multisampling and set the number of multisampling samples for a Canvas3D's GL context?
Stuff I've found so far:
Canvas3DContextAttributes.antialias
which however is documented as enabling an "antialiasing buffer" which I have never heard of. They probably meant to say "multisampling buffer" there? Also I found no way to specify sample count with that option.- "setting a QSurfaceFormat with samples greater than 0 using
QQuickWindow::setFormat()
". But I think this only applies to the window's GL context, and not to the Canvas3D's GL context.- If I were to use the
Canvas3D.RenderTargetBackground
orCanvas3D.RenderTargetForeground
render target, then the window's multisampling buffer would be used for the Canvas3D. But I useCanvas3D.RenderTargetOffscreenBuffer
.
- If I were to use the
glEnable(GL_MULTISAMPLE);
but I think that only works after we've created a context that supports multisampling.- For a QQuickFramebufferObject I can set
QOpenGLFramebufferObjectFormat.setSamples(4)
but I'm using Canvas3D, not QQFBO
Also, I know that my target device supports multisampling, but I don't know if it supports the extensions
GL_EXT_framebuffer_multisample
andGL_EXT_framebuffer_blit
mentioned here. Will that be a problem, considering my render target isCanvas3D.RenderTargetOffscreenBuffer
(i.e. a FBO)?