Yes. When you pass in the custom QSurfaceFormat to QQuickWindow’s setFormat() function, make sure that you have requested a stencil buffer by calling QSurfaceFormat::setStencilBufferSize(8). Qt Quick requiers the stencil buffer for some operations.
Ideally, grab the surface format from QQuickWindow, make your changes to it and set it back. In your QQuickView subclass ctor do something like:
MyQuickView::MyQuickView()
: QQuickView()
{
QSurfaceFormat f = format();
format.setVersion(...);
format.setProfile(...);
setFormat(f);
}
This way, the surface format will already be set up to have a stencil buffer.
↧








