How to per-pixel window transparency

Hello, I want to make an effect where the transparency of the window depends on the alpha value of the framebuffer. Is that possible?
To explain with examples:
like Elder Scrolls Online’s launcher where the edges are semi transparent
like Riots launch icon that shows riot games on the screen when launching LOL

Its a per-pixel window transparency. Currently I can only get a opacity that effect the entire window to work.

See the documentation on Window Transparency. There are some issues on Windows, if you have an AMD GPU I believe you need to turn OpenGL triple buffering off. There is a solution being worked on.

The key is the framebuffer alpha, not window opacity. Create the window with GLFW_TRANSPARENT_FRAMEBUFFER set to GLFW_TRUE, then make sure your rendering writes meaningful alpha into the default framebuffer, for example via a clear color with alpha or blended draws. Also confirm your compositor/desktop supports it. If you are on Windows with an AMD GPU, the triple-buffering workaround dougbinks mentioned may be needed. What OS and GPU are you testing on? That determines whether this should work today or is the known limitation.