GLWpfControl
GLWpfControl copied to clipboard
Antialiasing & Stencil buffer not working
Hi all. Thank you for excellent work. Easy to implement - very fast and convenient. For Apps with WPF and OpenGL it is a must. I just want to indicate that the antialiasing as well as the stencil buffer are not working. These two features would be very welcome. As your PresentationParameters structure has already reserved members MultiSampleQuality, EnableAutoDepthStencil I presume that you have already plan to implement them. Looking forward to those features.
Thanks @ChroChro !
So in terms of the design, the problem is we're rendering to a texture, and sharing that with DirectX. Doing this with a multi-sampled texture is particularly tough.
We might also want to add some ability to attach a stencil buffer to the FrameBuffer Object too, as at the moment I believe it's only a Depth Renderbuffer rather than a depth + stencil.
Would definitely merge a PR containing this if you're up for it.
The simplest thing for this is just to always a stencil buffer along with the depth. If it's unused, it doesn't matter.
#45 added stencil to the control, so that is part of this issue done. If someone wants to look at MSAA they are free to do so, I don't know if/when I'll get to look at this.
Multisampling support would be greatly appreciated, I tried to enable it with GLFW.WindowHint in the WpfControl class, however it seems tougher than this, also tried to play with the MSAA parameters of the DX interop class, no success as well.
Is this a thing now or still in limbo?
Multisampling has not yet been implemented. The implementation is complicated by the fact that we are sharing DX framebuffer with OpenGL so we need to make sure the sharing works according to the rules of NV_DX_interop
and if I remember correctly there is something in there that complicates sharing MSAA framebuffers (but I could be misremembering).