Closed nikkymen closed 3 years ago
Hey, thanks for your interest :)
I'm aware of this issue and tried to solve it once already but didn't get it to work. My idea was to use a multisampling texture for offscreen rendering and a second normal texture and use QBlitFrameBuffer
to get an antialiased image.
If you have an idea feel free to create a pull request :) Maybe I'll get round to checking out this issue the next days.
Could you maybe also share your code? The problem is that in the examples I produced it's not clearly visible whether antialiasing works or not.
If you have an idea feel free to create a pull request :) Maybe I'll get round to checking out this issue the next days.
Unfortunately, my experience with OpenGL is almost zero. I tried to set QSurfaceFormat with setSamples(16) for Qt3DWidget, but this only works for drawing inside Qt3DWidget::paintGL() method
Could you maybe also share your code? The problem is that in the examples I produced it's not clearly visible whether antialiasing works or not.
Your example is quite suitable for observing this issue: you just need to comment out the animation and replace using Qt3DWidget with Qt3DWindow.
I get the following pictures - the edge differences are quite obvious.
Qt3DWidget:
Qt3DWindow:
Ah ok well the difference is clearly visible, thanks. I'll try to have another look the next days.
All done ;) You only have to set the version of the format to at least 3.0 and define the number of samples (checkout the README on the main page I'll explain it there).
All done ;) You only have to set the version of the format to at least 3.0 and define the number of samples (checkout the README on the main page I'll explain it there).
Nice! I was close to your solution :D
Thanks for the code!
I noticed that your solution does not use anti-aliasing.
Objects appear smoother when I using Qt3DExtras::Qt3DWindow
Qt3DWidget:
Qt3DWindow:
Any thoughts on how this can be done?