GLWpfControl icon indicating copy to clipboard operation
GLWpfControl copied to clipboard

Antialiasing & Stencil buffer not working

Open ChroChro opened this issue 4 years ago • 5 comments

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.

ChroChro avatar Dec 28 '20 12:12 ChroChro

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.

varon avatar Jan 06 '21 13:01 varon

#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.

NogginBops avatar Mar 20 '22 23:03 NogginBops

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.

orosbogdan avatar Apr 10 '22 23:04 orosbogdan

Is this a thing now or still in limbo?

glemselenselv avatar Apr 18 '24 20:04 glemselenselv

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).

NogginBops avatar Apr 19 '24 10:04 NogginBops