osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Add stencil support for renderers

Open Flutterish opened this issue 1 year ago • 1 comments

This adds StencilInfo and appropriate methods to renderers. It also adds an 8-bit stencil buffer to the screen buffers (please doublecheck if all window types have it, I only added it to the SDL window as I have no way to check if the mobile ones or OsuTkWindow work). This is a part of my work towards #3510 - the even-odd fill algorithm is very easy to implement with a stencil buffer.

Flutterish avatar Aug 11 '22 08:08 Flutterish

Waiting for #5352 to be merged before I can use the DepthStencilFunction.

Flutterish avatar Aug 11 '22 13:08 Flutterish

Looks good. Added a test scene to demonstrate usage + test it.

image

smoogipoo avatar Aug 12 '22 07:08 smoogipoo

Do you have a way to test whether android/ios (OsuTkWindow) and other windows have the stencil buffer attached? I suspect they might not but I don't think I have a way to test that myself.

Flutterish avatar Aug 12 '22 07:08 Flutterish

I don't. As far as I know we're requesting the default context provided by the platforms.

smoogipoo avatar Aug 12 '22 07:08 smoogipoo