Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QGL::SampleBuffers and stencil buffer based picking
jcxz last edited by
i have a 3D OpenGL application, where I implement object picking with stencil buffer.
To have the polygons rendered nice and smooth, I used an OpenGL context with QGL::SampleBuffers enabled.
However the problem is that now when I resize/maximize the window picking stops working correctly.
It seems like if the stenciling buffer keeps its original dimensions and does not resize on window resizing/maximization.
When I turn of antialiasing, picking works as expected including resizing the window. Yet another interesting thing
is that when I start my window maximized, stenciling and antialiasing work together as expected.
So my question is, can I use QGL::SampleBuffers together with stencil buffer in Qt ?
If so, what else do i have to enable to make it work reliably ?
I am using Qt 4.8.1 on Windows with MSVC compiler, but I would like the solution to work on as many platforms as possible.
For displaying the scene I am reimplementing the drawbackground() method of QGraphicsScene.
Thanks for your answers