Custom shaped window?

I have been trying to wrap my head around this. I am trying to make a custom shaped window using SDL 2. In the doucmentation I have come across: SDL_SetWindowShape()

Now I am trying to call SDL_SetWindowShape() but I do no know what to put as the last parameter.

Does anyone have a simple example of creating a custom shaped window that I may please see? As I cannot find anything online.

Thanks

That trollface is a shaped window. The filename is

testshape.c

Yeah, it is in the test-folder of the repo. There you go:

-Cass

2 Likes

Is this supposed to work on macOS? Iā€™m trying to reproduce this, but always get a square window, not a shaped one.